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