/// <summary> /// Helper method; converts the collection into an <see cref="T:Guanima.Redis.Configuration.IEndPointConfiguration"/> collection for the interface implementation. /// </summary> /// <returns></returns> internal IList<IEndPointConfiguration> ToIEndPointConfigurationCollection() { var retval = new List<IEndPointConfiguration>(Count); foreach (EndPointElement e in this) { var config = new EndPointConfiguration(e.EndPoint, e.Alias, e.Password); retval.Add(config); } return retval.AsReadOnly(); }
protected RedisClient GetSingleNodeClient() { // try to hit all lines in the config classes var mcc = new RedisClientConfiguration(); var server = new EndPointConfiguration(new IPEndPoint(IPAddress.Loopback, 6379)); mcc.Servers.Add(server); mcc.NodeLocator = typeof(SingleNodeLocator); mcc.KeyTransformer = typeof(DefaultKeyTransformer); mcc.Transcoder = typeof(DefaultTranscoder); mcc.SocketPool.MinPoolSize = 10; mcc.SocketPool.MaxPoolSize = 100; mcc.SocketPool.ConnectionTimeout = new TimeSpan(0, 0, 10); mcc.SocketPool.DeadTimeout = new TimeSpan(0, 0, 30); return new RedisClient(mcc); }