Class LimitedDictionary<TKey, TValue>
- Namespace
- Vintagestory.API.Datastructures
- Assembly
- VintagestoryAPI.dll
Can only hold a limited amount of elements, discards oldest elements once the capacity is reached.
public class LimitedDictionary<TKey, TValue>
Type Parameters
TKey
TValue
- Inheritance
-
LimitedDictionary<TKey, TValue>
- Inherited Members
- Extension Methods
Constructors
LimitedDictionary(int)
Create a new limited dictionary with given maximum capacity
public LimitedDictionary(int maxCapacity)
Parameters
maxCapacity
int
Properties
Count
public int Count { get; }
Property Value
this[TKey]
public TValue this[TKey key] { get; set; }
Parameters
key
TKey
Property Value
- TValue
Methods
Add(TKey, TValue)
public void Add(TKey key, TValue value)
Parameters
key
TKeyvalue
TValue