Esempio n. 1
0
 public RedisHelper(int dbNum, string readWriteHosts)
 {
     DbNum = dbNum;
     _conn =
         string.IsNullOrWhiteSpace(readWriteHosts) ?
         RedisConnectionManager.Instance :
         RedisConnectionManager.StoreInstance(readWriteHosts);
 }
Esempio n. 2
0
 /// <summary>
 /// 获取redis连接
 /// </summary>
 /// <param name="handler"></param>
 public static void PrepareConnection(Func <ConnectionMultiplexer, bool> handler)
 {
     handler.Invoke(RedisConnectionManager.StoreInstance());
 }