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

◆ IsProperSubsetOf() [2/2]

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

Definition at line 1160 of file ImmutableHashSet.cs.

1161 {
1162 Requires.NotNull(other, "other");
1163 if (origin.Root.IsEmpty)
1164 {
1165 return other.Any();
1166 }
1167 HashSet<T> hashSet = new HashSet<T>(other, origin.EqualityComparer);
1168 if (origin.Count >= hashSet.Count)
1169 {
1170 return false;
1171 }
1172 int num = 0;
1173 bool flag = false;
1174 foreach (T item in hashSet)
1175 {
1176 if (Contains(item, origin))
1177 {
1178 num++;
1179 }
1180 else
1181 {
1182 flag = true;
1183 }
1184 if (num == origin.Count && flag)
1185 {
1186 return true;
1187 }
1188 }
1189 return false;
1190 }

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