public RestaurantConnections(IRedisSettings settings) { _connectionMultiplexer = ConnectionMultiplexer.Connect(settings.ConnectionString); _prefix = settings.RestaurantConnections; }
public RedisCacheManager(IRedisSettings redisSettings) { _distributedCache = ServiceTool.ServiceProvider.GetService <IDistributedCache>(); _redisEndpoint = new RedisEndpoint(redisSettings.RedisHostIP, Convert.ToInt32(redisSettings.RedisPort)); }
/// <summary> /// Creates a new instance of <see cref="RedisCache"/> /// </summary> /// <param name="settings">The Redis connection settings</param> public RedisCache(IRedisSettings settings) { _settings = settings; _lazyRedisConnection = new Lazy <ConnectionMultiplexer>(() => ConnectionMultiplexer.Connect(settings.ConnectionString), true); }
/// <summary> /// Initializes a new instance of the <see cref="RedisSettingsContractToViewHostAdapter" /> class. /// </summary> /// <param name="view">The view.</param> public RedisSettingsContractToViewHostAdapter(IRedisSettings view) { _view = view; }
public RedisService(IRedisSettings redisSettings) { redis = ConnectionMultiplexer.Connect(redisSettings.ConnectionString); db = redis.GetDatabase(); }
public RedisWrapper(IRedisSettings redisSettings) { ConnectionMultiplexer redis = ConnectionMultiplexer.Connect(redisSettings.RedisAddress); db = redis.GetDatabase(); }
public OrderConnections(IRedisSettings settings) { _connectionMultiplexer = ConnectionMultiplexer.Connect(settings.ConnectionString); _prefix = settings.OrderConnections; }