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

◆ Except() [3/3]

static MutationResult System.Collections.Immutable.ImmutableHashSet< T >.Except ( IEnumerable< T > other,
IEqualityComparer< T > equalityComparer,
IEqualityComparer< HashBucket > hashBucketEqualityComparer,
SortedInt32KeyNode< HashBucket > root )
inlinestaticprivate

Definition at line 1109 of file ImmutableHashSet.cs.

1110 {
1111 Requires.NotNull(other, "other");
1112 Requires.NotNull(equalityComparer, "equalityComparer");
1113 Requires.NotNull(root, "root");
1114 int num = 0;
1116 foreach (T item in other.GetEnumerableDisposable<T, Enumerator>())
1117 {
1118 int num2 = ((item != null) ? equalityComparer.GetHashCode(item) : 0);
1120 {
1121 OperationResult result;
1122 HashBucket newBucket = value.Remove(item, equalityComparer, out result);
1123 if (result == OperationResult.SizeChanged)
1124 {
1125 num--;
1127 }
1128 }
1129 }
1130 return new MutationResult(sortedInt32KeyNode, num);
1131 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
static SortedInt32KeyNode< HashBucket > UpdateRoot(SortedInt32KeyNode< HashBucket > root, int hashCode, IEqualityComparer< HashBucket > hashBucketEqualityComparer, HashBucket newBucket)

References System.item, System.other, System.Collections.Generic.Dictionary< TKey, TValue >.Remove(), System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue(), System.Collections.Immutable.ImmutableHashSet< T >.UpdateRoot(), and System.value.