public void RemoveHash(string key)
        {
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }

            _transaction.QueueCommand(x => x.Remove(RedisStorage.GetRedisKey(key)));
        }
예제 #2
0
        public Dictionary <string, string> GetAllEntriesFromHash(string key)
        {
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }

            var result = Redis.GetAllEntriesFromHash(RedisStorage.GetRedisKey(key));

            return(result.Count != 0 ? result : null);
        }
예제 #3
0
        public HashSet <string> GetAllItemsFromSet(string key)
        {
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }

            var result = Redis.GetAllItemsFromSortedSet(RedisStorage.GetRedisKey(key));

            return(new HashSet <string>(result));
        }
예제 #4
0
파일: Redis.cs 프로젝트: hahmed/HangFire
        public static void BeforeRedisScenario()
        {
            GlobalLock.Acquire();
            LogManager.LogFactory = new ConsoleLogFactory();

            Storage = new RedisStorage(RedisHost, RedisDb);
            JobStorage.Current = Storage;

            Client = Storage.PooledManager.GetClient();
            Client.FlushDb();
        }
예제 #5
0
        public void SetRangeInHash(string key, IEnumerable <KeyValuePair <string, string> > keyValuePairs)
        {
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }
            if (keyValuePairs == null)
            {
                throw new ArgumentNullException("keyValuePairs");
            }

            Redis.SetRangeInHash(RedisStorage.GetRedisKey(key), keyValuePairs);
        }