Class DictionaryExtensions
INTERNAL CLASS. DO NOT USE.
public static class DictionaryExtensions
- Inheritance
-
DictionaryExtensions
- Inherited Members
Methods
AddOrGet<TKey, TValue>(Dictionary<TKey, TValue>, TKey)
public static TValue AddOrGet<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key) where TKey : notnull where TValue : new()
Parameters
dictionaryDictionary<TKey, TValue>keyTKey
Returns
- TValue
Type Parameters
TKeyTValue
AddOrGet<TKey, TValue>(Dictionary<TKey, TValue>, TKey, Func<TValue>)
public static TValue AddOrGet<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, Func<TValue> newValue) where TKey : notnull
Parameters
dictionaryDictionary<TKey, TValue>keyTKeynewValueFunc<TValue>
Returns
- TValue
Type Parameters
TKeyTValue
AddRange<T>(HashSet<T>, IEnumerable<T>)
public static void AddRange<T>(this HashSet<T> hashSet, IEnumerable<T> values)
Parameters
hashSetHashSet<T>valuesIEnumerable<T>
Type Parameters
T
Add<TKey, TValue>(Dictionary<TKey, HashSet<TValue>>, TKey, TValue)
public static void Add<TKey, TValue>(this Dictionary<TKey, HashSet<TValue>> dictionary, TKey key, TValue value) where TKey : notnull
Parameters
dictionaryDictionary<TKey, HashSet<TValue>>keyTKeyvalueTValue
Type Parameters
TKeyTValue
Contains<TKey, TValue>(IReadOnlyDictionary<TKey, IReadOnlyCollection<TValue>>, TKey, TValue, IEqualityComparer<TValue>)
public static bool Contains<TKey, TValue>(this IReadOnlyDictionary<TKey, IReadOnlyCollection<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue> valueComparer) where TKey : notnull
Parameters
dictionaryIReadOnlyDictionary<TKey, IReadOnlyCollection<TValue>>keyTKeyvalueTValuevalueComparerIEqualityComparer<TValue>
Returns
Type Parameters
TKeyTValue
ToReadOnly<TKey, TValue>(Dictionary<TKey, HashSet<TValue>>)
public static IReadOnlyDictionary<TKey, IReadOnlyCollection<TValue>> ToReadOnly<TKey, TValue>(this Dictionary<TKey, HashSet<TValue>> dictionary) where TKey : notnull
Parameters
dictionaryDictionary<TKey, HashSet<TValue>>
Returns
- IReadOnlyDictionary<TKey, IReadOnlyCollection<TValue>>
Type Parameters
TKeyTValue
ToReadOnly<TKey, TValue>(Dictionary<TKey, List<TValue>>)
public static IReadOnlyDictionary<TKey, IReadOnlyCollection<TValue>> ToReadOnly<TKey, TValue>(this Dictionary<TKey, List<TValue>> dictionary) where TKey : notnull
Parameters
dictionaryDictionary<TKey, List<TValue>>
Returns
- IReadOnlyDictionary<TKey, IReadOnlyCollection<TValue>>
Type Parameters
TKeyTValue
ToReadWrite<TKey, TValue>(IReadOnlyDictionary<TKey, IReadOnlyCollection<TValue>>, IEqualityComparer<TKey>?)
public static Dictionary<TKey, HashSet<TValue>> ToReadWrite<TKey, TValue>(this IReadOnlyDictionary<TKey, IReadOnlyCollection<TValue>> dictionary, IEqualityComparer<TKey>? comparer) where TKey : notnull
Parameters
dictionaryIReadOnlyDictionary<TKey, IReadOnlyCollection<TValue>>comparerIEqualityComparer<TKey>
Returns
- Dictionary<TKey, HashSet<TValue>>
Type Parameters
TKeyTValue