PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.Dictionaries.ExpiringDictionary< TKey, TValue > Class Template Reference

Provides a wrapping read-write layer around another dictionary effectively allowing transparent rename of the keys. More...

Inheritance diagram for PeanutButter.Utils.Dictionaries.ExpiringDictionary< TKey, TValue >:

Public Member Functions

 ExpiringDictionary (TimeSpan ttl)
 Provides a dictionary which expires elements based on their age.
IEnumerator< KeyValuePair< TKey, TValue > > GetEnumerator ()
void Add (KeyValuePair< TKey, TValue > item)
void Clear ()
bool Contains (KeyValuePair< TKey, TValue > item)
void CopyTo (KeyValuePair< TKey, TValue >[] array, int arrayIndex)
bool Remove (KeyValuePair< TKey, TValue > item)
void Add (TKey key, TValue value)
bool ContainsKey (TKey key)
bool Remove (TKey key)
bool TryGetValue (TKey key, out TValue value)

Properties

int Count [get]
bool IsReadOnly [get]
TValue this[TKey key] [get, set]
ICollection< TKey > Keys [get]
ICollection< TValue > Values [get]

Detailed Description

Provides a wrapping read-write layer around another dictionary effectively allowing transparent rename of the keys.

Template Parameters
TKeyType of keys
TValueType of values stored

Member Function Documentation

◆ ExpiringDictionary()

PeanutButter.Utils.Dictionaries.ExpiringDictionary< TKey, TValue >.ExpiringDictionary ( TimeSpan ttl)

Provides a dictionary which expires elements based on their age.

Parameters
ttl
Exceptions
ArgumentException

The documentation for this class was generated from the following file:
  • source/Utils/PeanutButter.Utils/Dictionaries/ExpiringDictionary.cs