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

            _transaction.QueueCommand(x => x.Remove(RedisStorage.GetRedisKey(key)));
        }
Esempio n. 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);
        }
Esempio n. 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));
        }
Esempio n. 4
0
        public static void BeforeRedisScenario()
        {
            GlobalLock.Acquire();
            LogManager.LogFactory = new ConsoleLogFactory();

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

            Client = Storage.PooledManager.GetClient();
            Client.FlushDb();
        }
Esempio n. 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);
        }