Class DTable<TKey, TValue>
- Namespace
 - Vintagestory.Common
 
- Assembly
 - VintagestoryAPI.dll
 
A single object to allow the arrays in ConcurrentSmallDictionary to be replaced atomically. Keys, once entered in the keys array within a DTable, are invariable: if we ever need to remove a key we will create a new DTable
public class DTable<TKey, TValue>
  Type Parameters
TKeyTValue
- Inheritance
 - 
      
      DTable<TKey, TValue>
 
- Inherited Members
 
- Extension Methods
 
Constructors
DTable(int)
public DTable(int capacity)
  Parameters
capacityint
DTable(DTable<TKey, TValue>, int)
Special constructor which copies the old arrays and removes one entry
public DTable(DTable<TKey, TValue> old, int toRemove)
  Parameters
DTable(DTable<TKey, TValue>, TKey, TValue)
Special constructor which copies the old arrays and adds one new entry at the end - all will be atomic when the Dictionary replaces contents with the results of this
public DTable(DTable<TKey, TValue> old, TKey key, TValue value)
  Parameters
oldDTable<TKey, TValue>keyTKeyvalueTValue
DTable(TKey, TValue)
Special constructor for a new array with a single, first, entry
public DTable(TKey key, TValue value)
  Parameters
keyTKeyvalueTValue
Fields
count
public volatile int count
  Field Value
keys
public readonly TKey[] keys
  Field Value
- TKey[]
 
values
public readonly TValue[] values
  Field Value
- TValue[]