public RedisConnectionManager(IRedisServerSettings settings, IRedisConnection redisConnection)
 {
     this.settings = settings;
     //this.connectionString = new Lazy<string>(GetConnectionString);
     //this.connectionString = GetConnectionString();
     this.connection = redisConnection;
 }
示例#2
0
        public RedisConnectionWrapper(IRedisServerSettings settings, ILogger logger)
        {
            _settings = settings;
            _logger   = logger;

            _connectionString = new Lazy <string>(GetConnectionString);
        }
示例#3
0
 public RedisCacheStore(IRedisConnection connection, IRedisServerSettings settings)
 {
     _connection = connection;
     _subscriber = _connection.GetSubscriber();
     _database   = _connection.GetDatabase();
     _server     = _connection.GetServer(_connection.GetEndPoints().FirstOrDefault());
     _settings   = settings;
 }
示例#4
0
 public RedisCacheStore(IRedisConnectionWrapper connectionWrapper, IRedisServerSettings settings, ISerializer serializer)
 {
     _database   = connectionWrapper.Database(settings.DefaultDb);
     _serializer = serializer;
     _readFlag   = settings.PreferSlaveForRead ? CommandFlags.PreferSlave : CommandFlags.PreferMaster;
 }
示例#5
0
 public RedisConnectionWrapper(ILogger logger)
 {
     this.settings         = ConfigurationManager.GetSection("redis") as RedisServerSettings;
     this.logger           = logger;
     this.connectionString = GetConnectionString();
 }
 /// <inheritdoc />
 public RedisConnection(IRedisServerSettings settings)
 {
     _settings         = settings;
     _connectionString = new Lazy <string>(GetConnectionString);
 }