示例#1
0
 /// <summary>
 /// Determines whether the <see cref="T:System.Collections.Generic.ICollection`1" /> contains a specific value.
 /// </summary>
 /// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.ICollection`1" />.</param>
 /// <returns>
 /// true if <paramref name="item" /> is found in the <see cref="T:System.Collections.Generic.ICollection`1" />; otherwise, false.
 /// </returns>
 public bool Contains(KeyValuePair <TKey, TValue> item)
 {
     return(RedisDb.HashExists(RedisKey, KeySerializer.Serialize(item.Key)));
 }
示例#2
0
 /// <summary>
 /// Determines whether the <see cref="T:System.Collections.Generic.IDictionary`2" /> contains an element with the specified key.
 /// </summary>
 /// <param name="key">The key to locate in the <see cref="T:System.Collections.Generic.IDictionary`2" />.</param>
 /// <returns>
 /// true if the <see cref="T:System.Collections.Generic.IDictionary`2" /> contains an element with the key; otherwise, false.
 /// </returns>
 public bool ContainsKey(TKey key)
 {
     return(RedisDb.HashExists(RedisKey, KeySerializer.Serialize(key)));
 }