Beispiel #1
0
 public RedisStore(RedisConnectionSettings settings)
 {
     _dispose    = true;
     _connection = new RedisConnection(settings.HostName,
                                       settings.Port,
                                       (int)(settings.IoTimeout <= TimeSpan.Zero ? -1 : settings.IoTimeout.TotalMilliseconds),
                                       string.IsNullOrEmpty(settings.Password) ? null : settings.Password,
                                       settings.MaxUnsentBytes,
                                       settings.AllowAdmin,
                                       (int)settings.SynTimeout.TotalMilliseconds);
     _connection.Open();
     _databaseId = settings.DatabaseId;
 }
Beispiel #2
0
 public RedisStore(RedisConnectionSettings settings)
 {
     _dispose = true;
     _connection = new RedisConnection(settings.HostName,
         settings.Port,
         (int)(settings.IoTimeout <= TimeSpan.Zero ? -1 : settings.IoTimeout.TotalMilliseconds),
         string.IsNullOrEmpty(settings.Password) ? null : settings.Password,
         settings.MaxUnsentBytes,
         settings.AllowAdmin,
         (int)settings.SynTimeout.TotalMilliseconds);
     _connection.Open();
     _databaseId = settings.DatabaseId;
 }
Beispiel #3
0
 public RedisStore(string connectingString)
     : this(RedisConnectionSettings.Parse(connectingString))
 {
 }