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

◆ Union() [4/4]

static MutationResult System.Collections.Immutable.ImmutableHashSet< T >.Union ( IEnumerable< T > other,
MutationInput origin )
inlinestaticprivate

Definition at line 1027 of file ImmutableHashSet.cs.

1028 {
1029 Requires.NotNull(other, "other");
1030 int num = 0;
1032 foreach (T item in other.GetEnumerableDisposable<T, Enumerator>())
1033 {
1034 int num2 = ((item != null) ? origin.EqualityComparer.GetHashCode(item) : 0);
1035 OperationResult result;
1036 HashBucket newBucket = sortedInt32KeyNode.GetValueOrDefault(num2).Add(item, origin.EqualityComparer, out result);
1037 if (result == OperationResult.SizeChanged)
1038 {
1039 sortedInt32KeyNode = UpdateRoot(sortedInt32KeyNode, num2, origin.HashBucketEqualityComparer, newBucket);
1040 num++;
1041 }
1042 }
1043 return new MutationResult(sortedInt32KeyNode, num);
1044 }
void Add(TKey key, TValue value)
static SortedInt32KeyNode< HashBucket > UpdateRoot(SortedInt32KeyNode< HashBucket > root, int hashCode, IEqualityComparer< HashBucket > hashBucketEqualityComparer, HashBucket newBucket)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.item, System.other, System.Collections.Immutable.ImmutableHashSet< T >.MutationInput.Root, and System.Collections.Immutable.ImmutableHashSet< T >.UpdateRoot().