Ejemplo n.º 1
0
        public Dictionary <string, T> HGet <T>(string hkey, int db = -1)
        {
            var dic     = new Dictionary <string, T>();
            var entries = RedisBoss.GetDB().HashGetAll(hkey);

            if (entries == null || entries.Length <= 0)
            {
                return(null);
            }

            foreach (var item in entries.ToDictionary())
            {
                dic.Add(item.Key, RedisBoss.CovnertToObj <T>(item.Value));
            }

            return(dic);
        }
Ejemplo n.º 2
0
 public T Spop <T>(string key, int db = -1)
 => RedisBoss.CovnertToObj <T>(RedisBoss.GetDB(db).SetPop(key));
Ejemplo n.º 3
0
 public T Rpop <T>(string key, int db = -1)
 => RedisBoss.CovnertToObj <T>(RedisBoss.GetDB(db).ListRightPop(key));