Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ RemoveRange() [1/2]

ImmutableDictionary< TKey, TValue > System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.RemoveRange ( IEnumerable< TKey > keys)
inline

Implements System.Collections.Immutable.IImmutableDictionary< TKey, TValue >.

Definition at line 1140 of file ImmutableDictionary.cs.

1141 {
1142 Requires.NotNull(keys, "keys");
1143 int num = _count;
1145 foreach (TKey key in keys)
1146 {
1147 int hashCode = KeyComparer.GetHashCode(key);
1149 {
1150 OperationResult result;
1151 HashBucket newBucket = value.Remove(key, _comparers.KeyOnlyComparer, out result);
1153 if (result == OperationResult.SizeChanged)
1154 {
1155 num--;
1156 }
1157 }
1158 }
1159 return Wrap(sortedInt32KeyNode, num);
1160 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
IEqualityComparer< KeyValuePair< TKey, TValue > > KeyOnlyComparer
readonly SortedInt32KeyNode< HashBucket > _root
static ImmutableDictionary< TKey, TValue > Wrap(SortedInt32KeyNode< HashBucket > root, Comparers comparers, int count)
static SortedInt32KeyNode< HashBucket > UpdateRoot(SortedInt32KeyNode< HashBucket > root, int hashCode, HashBucket newBucket, IEqualityComparer< HashBucket > hashBucketComparer)

References System.Collections.Immutable.ImmutableDictionary< TKey, TValue >._comparers, System.Collections.Immutable.ImmutableDictionary< TKey, TValue >._count, System.Collections.Immutable.ImmutableDictionary< TKey, TValue >._root, System.Collections.IEqualityComparer.GetHashCode(), System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.Comparers.HashBucketEqualityComparer, System.key, System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.KeyComparer, System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.Comparers.KeyOnlyComparer, System.keys, System.Collections.Generic.Dictionary< TKey, TValue >.Remove(), System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue(), System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.UpdateRoot(), System.value, and System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.Wrap().

Referenced by System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.RemoveRange().