Пример #1
0
 /// <summary>
 /// Returns an enumerator that iterates through the collection.
 /// </summary>
 /// <returns>
 /// An enumerator that can be used to iterate through the collection.
 /// </returns>
 public IEnumerator <KeyValuePair <TKey, TValue> > GetEnumerator()
 {
     foreach (var hashKey in RedisDb.HashKeys(RedisKey))
     {
         var redisValue = RedisDb.HashGet(RedisKey, hashKey);
         yield return(new KeyValuePair <TKey, TValue>(KeySerializer.Deserialize <TKey>(hashKey), ValueSerializer.Deserialize <TValue>(redisValue)));
     }
 }