예제 #1
0
 public StringUnitTest(ITestOutputHelper testOutput)
 {
     redisHelper      = new Sample.RedisHelper();
     Connection       = RedisConnectionHelper.Instanse ?? RedisConnectionHelper.GetConnectionMultiplexer();
     Database         = Connection.GetDatabase(0);
     testOutputHelper = testOutput;
 }
예제 #2
0
파일: RedisClient.cs 프로젝트: hl6013/nuget
 public RedisClient(int dbNum, string readWriteHosts)
 {
     DbNum = dbNum;
     _conn =
         string.IsNullOrWhiteSpace(readWriteHosts)
             ? RedisConnectionHelper.Instance
             : RedisConnectionHelper.GetConnectionMultiplexer(readWriteHosts);
 }
예제 #3
0
 public RedisClient(int dbNum, string expirySecond, string readWriteHosts)
 {
     DbNum = dbNum;//默认1
     _conn =
         string.IsNullOrWhiteSpace(readWriteHosts)
             ? RedisConnectionHelper.Instance
             : RedisConnectionHelper.GetConnectionMultiplexer(readWriteHosts);
     this.expiry = TimeSpan.FromSeconds(Double.Parse(expirySecond));
 }
예제 #4
0
 public RedisClient(int dbNum, string readWriteHosts)
 {
     DbNum = dbNum;
     _conn =
         string.IsNullOrWhiteSpace(readWriteHosts)
             ? RedisConnectionHelper.Instance
             : RedisConnectionHelper.GetConnectionMultiplexer(readWriteHosts);
     expiry = TimeSpan.FromHours(Double.Parse(CustomConfigParam.RedisExpiryHours));
 }