public void RemoveHash(string key) { if (key == null) { throw new ArgumentNullException("key"); } _transaction.QueueCommand(x => x.Remove(RedisStorage.GetRedisKey(key))); }
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); }
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)); }
public static void BeforeRedisScenario() { GlobalLock.Acquire(); LogManager.LogFactory = new ConsoleLogFactory(); Storage = new RedisStorage(RedisHost, RedisDb); JobStorage.Current = Storage; Client = Storage.PooledManager.GetClient(); Client.FlushDb(); }
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); }