M&B: Bannerlord 1.2.12
The horns sound, the ravens gather.
|
Wraps the Dictionary<TKey, TValue> class to present a time-aware data structure that prunes stale entries. This class is lightweight when idle, no events will be run periodically. Pruning of expired cache items is only done on explicit or implicit request.
Public Member Functions | |
TimedDictionaryCache (long validMilliseconds) | |
TimedDictionaryCache (TimeSpan validTimeSpan) | |
void | PruneExpiredItems () |
There is normally no need to explicitly call this method, expired items are pruned implicitly when interacting with this class. | |
void | Clear () |
bool | ContainsKey (TKey key) |
bool | Remove (TKey key) |
bool | TryGetValue (TKey key, out TValue value) |
MBReadOnlyDictionary< TKey, TValue > | AsReadOnlyDictionary () |
Beware: Relatively expensive operation. Do not use if not compulsory. | |
Properties | |
TValue | this[TKey key] [get, set] |
TaleWorlds.Library.TimedDictionaryCache< TKey, TValue >.TimedDictionaryCache | ( | long | validMilliseconds | ) |
TaleWorlds.Library.TimedDictionaryCache< TKey, TValue >.TimedDictionaryCache | ( | TimeSpan | validTimeSpan | ) |
void TaleWorlds.Library.TimedDictionaryCache< TKey, TValue >.PruneExpiredItems | ( | ) |
void TaleWorlds.Library.TimedDictionaryCache< TKey, TValue >.Clear | ( | ) |
bool TaleWorlds.Library.TimedDictionaryCache< TKey, TValue >.ContainsKey | ( | TKey | key | ) |
bool TaleWorlds.Library.TimedDictionaryCache< TKey, TValue >.Remove | ( | TKey | key | ) |
bool TaleWorlds.Library.TimedDictionaryCache< TKey, TValue >.TryGetValue | ( | TKey | key, |
out TValue | value ) |
MBReadOnlyDictionary< TKey, TValue > TaleWorlds.Library.TimedDictionaryCache< TKey, TValue >.AsReadOnlyDictionary | ( | ) |
|
getset |