Class DictExtensions
- Namespace
- Vintagestory.API.Util
- Assembly
- VintagestoryAPI.dll
public static class DictExtensions
- Inheritance
-
DictExtensions
- Inherited Members
Methods
AddRange<K, V>(IDictionary<K, V>, IDictionary<K, V>)
Add several elements to dict
public static void AddRange<K, V>(this IDictionary<K, V> dict, IDictionary<K, V> elems)
Parameters
dictIDictionary<K, V>elemsIDictionary<K, V>
Type Parameters
KV
Get<K, V>(IDictionary<K, V>, K, V)
Get value or defaultValue if key does not exists
public static V Get<K, V>(this IDictionary<K, V> dict, K key, V defaultValue = default)
Parameters
dictIDictionary<K, V>keyKdefaultValueV
Returns
- V
Type Parameters
KV
RemoveAllByKey<K, V>(IDictionary<K, V>, Func<K, bool>)
public static void RemoveAllByKey<K, V>(this IDictionary<K, V> dict, Func<K, bool> predicate)
Parameters
dictIDictionary<K, V>predicateFunc<K, bool>
Type Parameters
KV
RemoveAll<K, V>(IDictionary<K, V>, Func<K, V, bool>)
public static void RemoveAll<K, V>(this IDictionary<K, V> dict, Func<K, V, bool> predicate)
Parameters
dictIDictionary<K, V>predicateFunc<K, V, bool>
Type Parameters
KV
Remove<K, V>(ConcurrentDictionary<K, V>, K)
public static void Remove<K, V>(this ConcurrentDictionary<K, V> dict, K key)
Parameters
dictConcurrentDictionary<K, V>keyK
Type Parameters
KV
Remove<K, V>(CachingConcurrentDictionary<K, V>, K)
public static void Remove<K, V>(this CachingConcurrentDictionary<K, V> dict, K key)
Parameters
dictCachingConcurrentDictionary<K, V>keyK
Type Parameters
KV