Beispiel #1
0
 /// <summary>
 /// 选择redis database
 /// </summary>
 /// <param name="dbIndex"></param>
 /// <returns></returns>
 public bool Select(int dbIndex = -1)
 {
     if (dbIndex > -1)
     {
         DBIndex = dbIndex;
     }
     if (!IsCluster)
     {
         if (_cnn.DoWithOne(RequestType.SELECT, DBIndex.ToString()).Data.IndexOf(RedisConst.ErrIndex, StringComparison.InvariantCultureIgnoreCase) == -1)
         {
             return(true);
         }
     }
     return(false);
 }