3 writes to _right
System.Collections.Immutable (3)
System\Collections\Immutable\ImmutableList_1.Node.cs (3)
90
_right
= right;
1478
_right
= right;
1526
_right
= right;
45 references to _right
System.Collections.Immutable (45)
System\Collections\Immutable\ImmutableList_1.Node.cs (45)
108
Debug.Assert(!(_left == null ^
_right
== null));
126
public Node? Right =>
_right
;
153
Debug.Assert(_left != null &&
_right
!= null);
162
return
_right
[index - _left._count - 1];
183
Debug.Assert(_left != null &&
_right
!= null);
191
return ref
_right
.ItemRefUnchecked(index - _left._count - 1);
292
Node newRight =
_right
!.Add(key);
320
Node newRight =
_right
!.Insert(index - _left._count - 1, key);
340
Node newRight =
_right
!.AddRange(keys);
357
Node newRight =
_right
!.AddRange(keys);
386
Node newRight =
_right
!.InsertRange(index - _left._count - 1, keys);
401
Debug.Assert(_left != null &&
_right
!= null);
409
if (
_right
.IsEmpty && _left.IsEmpty)
413
else if (
_right
.IsEmpty && !_left.IsEmpty)
417
else if (!
_right
.IsEmpty && _left.IsEmpty)
419
result =
_right
;
425
ImmutableList<T>.Node successor =
_right
;
431
ImmutableList<T>.Node newRight =
_right
.RemoveAt(0);
442
ImmutableList<T>.Node newRight =
_right
.RemoveAt(index - _left._count - 1);
516
ImmutableList<T>.Node newRight =
_right
!.ReplaceAt(index - _left._count - 1, value);
535
return this.MutateBoth(
_right
!.Reverse(), _left!.Reverse());
684
int result =
_right
!.BinarySearch(index - thisNodeIndex - 1, count, item, comparer);
701
int result = adjustedCount < 0 ? -1 :
_right
!.BinarySearch(0, adjustedCount, item, comparer);
1289
_right
!.Freeze();
1303
Debug.Assert(!
_right
!.IsEmpty);
1305
return
_right
.MutateLeft(this.MutateRight(
_right
._left!));
1317
return _left.MutateRight(this.MutateLeft(_left.
_right
!));
1327
Debug.Assert(!
_right
!.IsEmpty);
1328
Debug.Assert(!
_right
!._left!.IsEmpty);
1331
Node right =
_right
;
1335
right: right.MutateLeft(rightLeft.
_right
!));
1346
Debug.Assert(!_left.
_right
!.IsEmpty);
1350
Node leftRight = left.
_right
;
1353
right: this.MutateLeft(leftRight.
_right
!));
1367
return
_right
!._height - _left!._height;
1422
return
_right
!.BalanceFactor < 0 ? this.DoubleLeft() : this.RotateLeft();
1436
Debug.Assert(tree._left != null && tree.
_right
!= null);
1448
Debug.Assert(tree.
_right
!= null);
1449
tree.MutateRight(tree.
_right
.BalanceMany());
1498
return new Node(_key, left,
_right
!);
1503
_height = ParentHeight(left,
_right
!);
1504
_count = ParentCount(left,
_right
!);
1562
return new Node(key, _left!,
_right
!);
1609
private static bool Contains(Node node, T value, IEqualityComparer<T> equalityComparer) => !node.IsEmpty && (equalityComparer.Equals(value, node._key) || Contains(node._left!, value, equalityComparer) || Contains(node.
_right
!, value, equalityComparer));