예제 #1
0
 /// <summary>
 ///
 /// </summary>
 public RedisCacheService(RedisConfig redisConfig, ICollection <IJsonProvider> jsonProviders)
 {
     _jsonProvider = InjectionSelectionCommon.GetImplement(jsonProviders);
     ValidationCommon.Check(redisConfig, "redis配置异常", HttpStatus.Err.Name);
     new RedisConfigValidator().Validate(redisConfig).Check();
     _prefix = redisConfig.Name;
     CsRedisHelper.InitializeConfiguration(redisConfig);
 }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 public RedisCacheService(RedisConfig redisConfig)
 {
     new RedisConfigValidator().Validate(redisConfig).Check();
     _prefix = redisConfig.Name;
     CsRedisHelper.InitializeConfiguration(redisConfig);
 }