Beispiel #1
0
 /// <summary>
 /// 获得订阅
 /// </summary>
 /// <param name="redisConfig"></param>
 /// <returns></returns>
 public static ISubscriber GetSubscriber(RedisConfigModel redisConfig)
 {
     return(GetSubscriber(redisConfig.ConnectionString));
 }
Beispiel #2
0
 /// <summary>
 /// 获得数据库
 /// </summary>
 /// <param name="redisConfig"></param>
 /// <param name="dbIndex"></param>
 /// <returns></returns>
 public static IDatabase GetDb(RedisConfigModel redisConfig, int dbIndex = 0)
 {
     return(GetDb(redisConfig.ConnectionString, dbIndex));
 }
Beispiel #3
0
 /// <summary>
 /// Redis管理器
 /// </summary>
 /// <param name="redisConfig"></param>
 public RedisManager(RedisConfigModel redisConfig)
 {
     _connectionString = redisConfig.ConnectionString;
 }