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

◆ AddRange() [2/3]

ImmutableSortedDictionary< TKey, TValue > System.Collections.Immutable.ImmutableSortedDictionary< TKey, TValue >.AddRange ( IEnumerable< KeyValuePair< TKey, TValue > > items,
bool overwriteOnCollision,
bool avoidToSortedMap )
inlineprivate

Definition at line 1404 of file ImmutableSortedDictionary.cs.

1405 {
1406 Requires.NotNull(items, "items");
1407 if (IsEmpty && !avoidToSortedMap)
1408 {
1409 return FillFromEmpty(items, overwriteOnCollision);
1410 }
1411 Node node = _root;
1412 int num = _count;
1413 foreach (KeyValuePair<TKey, TValue> item in items)
1414 {
1415 bool replacedExistingValue = false;
1416 bool mutated;
1418 if (mutated)
1419 {
1420 node = node2;
1422 {
1423 num++;
1424 }
1425 }
1426 }
1427 return Wrap(node, num);
1428 }
void Add(TKey key, TValue value)
static ImmutableSortedDictionary< TKey, TValue > Wrap(Node root, int count, IComparer< TKey > keyComparer, IEqualityComparer< TValue > valueComparer)
ImmutableSortedDictionary< TKey, TValue > FillFromEmpty(IEnumerable< KeyValuePair< TKey, TValue > > items, bool overwriteOnCollision)

References System.Collections.Immutable.ImmutableSortedDictionary< TKey, TValue >._count, System.Collections.Immutable.ImmutableSortedDictionary< TKey, TValue >._keyComparer, System.Collections.Immutable.ImmutableSortedDictionary< TKey, TValue >._root, System.Collections.Immutable.ImmutableSortedDictionary< TKey, TValue >._valueComparer, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Collections.Immutable.ImmutableSortedDictionary< TKey, TValue >.FillFromEmpty(), System.Collections.Immutable.ImmutableSortedDictionary< TKey, TValue >.IsEmpty, System.item, and System.Collections.Immutable.ImmutableSortedDictionary< TKey, TValue >.Wrap().