/// Determines whether the <see cref="T:System.Collections.Generic.IDictionary`2"/> contains an element with the specified key.
/// </summary>
public bool ContainsKey(TKey key)
{
using (_lock.Read())
return _store.ContainsKey(key);
}
/// <summary>
/// Gets the value associated with the specified key.
/// </summary>
public bool TryGetValue(TKey key, out TValue value)
{
using (_lock.Read())
return _store.TryGetValue(key, out value);
}
/// <summary>
/// Gets an <see cref="T:System.Collections.Generic.ICollection`1"/> containing the keys of the <see cref="T:System.Collections.Generic.IDictionary`2"/>.
/// </summary>
public ICollection<TKey> Keys
{
get
{
using (_lock.Read())
return new List<TKey>(_store.Keys);
}
}
/// <summary>
/// Gets an <see cref="T:System.Collections.Generic.ICollection`1"/> containing the values in the <see cref="T:System.Collections.Generic.IDictionary`2"/>.
/// </summary>
public ICollection<TValue> Values
{
get
{
using (_lock.Read())
return new List<TValue>(_store.Values);
}
}
/// <summary>
/// Copies the elements of the <see cref="T:System.Collections.Generic.ICollection`1"/> to an <see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index.
/// </summary>
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
{
using (_lock.Read())
_store.CopyTo(array, arrayIndex);
}
/// <summary>
/// Returns an enumerator that iterates through the collection.
/// </summary>
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()