如何格式化以下 Redis 连接字符串:
连接字符串:myIP,keepAlive=180,ConnectRetry=30,ConnectTimeout=5000
我开始编写单元测试,但不断收到输入字符串格式不正确的错误消息
[TestFixtureSetUp]
private void Init()
{
var redisConnectionString = "myIP,keepAlive=180,ConnectRetry=30,ConnectTimeout=5000";
_clientsManager = new PooledRedisClientManager(redisConnectionString);
}
[Test]
public void CanConnectToRedis()
{
var readWrite = (RedisClient) _clientsManager.GetClient();
using (var redis = _clientsManager.GetClient())
{
var redisClient = redis;
}
}