Exemple #1
0
 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);
 }
Exemple #4
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="RedisSettingsContractToViewHostAdapter" /> class.
 /// </summary>
 /// <param name="view">The view.</param>
 public RedisSettingsContractToViewHostAdapter(IRedisSettings view)
 {
     _view = view;
 }
Exemple #5
0
 public RedisService(IRedisSettings redisSettings)
 {
     redis = ConnectionMultiplexer.Connect(redisSettings.ConnectionString);
     db    = redis.GetDatabase();
 }
Exemple #6
0
        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;
 }