Interface ICache<TKey, TValue>
- Namespace
- Gamelogic.Extensions
- Assembly
- Assembly-CSharp.dll
A data structure that can be used as a cache.
public interface ICache<TKey, TValue>
Type Parameters
TKeyThe type of the t key.
TValueThe type of the t value.
- Extension Methods
Properties
Count
Gets the number of elements in the cache .
int Count { get; }
Property Value
IsFull
Gets a value indicating whether this cache is full.
bool IsFull { get; }
Property Value
- bool
trueif this cache is full; otherwise,false.
this[TKey]
Gets or sets the value with the specified key. The method ContainsKey should always be called before getting the value of a key.
TValue this[TKey key] { get; set; }
Parameters
keyTKey
Property Value
- TValue
Methods
ContainsKey(TKey)
Determines whether this cache contains the specified key.
bool ContainsKey(TKey key)
Parameters
keyTKey
Returns
- bool
trueif the cache contains the key; otherwise,false.
Remove(TKey)
Removes the element at the specified key from the cache.
TValue Remove(TKey key)
Parameters
keyTKeyThe key.
Returns
- TValue
TValue.
RemoveOldest()
Removes the oldest item from the cache.
KeyValuePair<TKey, TValue> RemoveOldest()
Returns
- KeyValuePair<TKey, TValue>
KeyValuePair<TKey, TValue>.