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

◆ Remove() [6/6]

static MutationResult System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.Remove ( TKey key,
MutationInput origin )
inlinestaticprivate

Definition at line 1461 of file ImmutableDictionary.cs.

1462 {
1463 int hashCode = origin.KeyComparer.GetHashCode(key);
1464 if (origin.Root.TryGetValue(hashCode, out var value))
1465 {
1466 OperationResult result;
1467 SortedInt32KeyNode<HashBucket> root = UpdateRoot(origin.Root, hashCode, value.Remove(key, origin.KeyOnlyComparer, out result), origin.HashBucketComparer);
1468 return new MutationResult(root, (result == OperationResult.SizeChanged) ? (-1) : 0);
1469 }
1470 return new MutationResult(origin);
1471 }
static SortedInt32KeyNode< HashBucket > UpdateRoot(SortedInt32KeyNode< HashBucket > root, int hashCode, HashBucket newBucket, IEqualityComparer< HashBucket > hashBucketComparer)

References System.Collections.IEqualityComparer.GetHashCode(), System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.MutationInput.HashBucketComparer, System.key, System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.MutationInput.KeyComparer, System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.MutationInput.KeyOnlyComparer, System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.MutationInput.Root, System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue(), System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.UpdateRoot(), and System.value.