3 writes to _right
System.Collections.Immutable (3)
System\Collections\Immutable\ImmutableList_1.Node.cs (3)
90
_right
= right;
1475
_right
= right;
1523
_right
= right;
46 references to _right
System.Collections.Immutable (46)
System\Collections\Immutable\ImmutableList_1.Node.cs (46)
108
Debug.Assert(!(_left == null ^
_right
== null));
131
public Node? Right =>
_right
;
136
IBinaryTree? IBinaryTree.Right =>
_right
;
146
IBinaryTree<T>? IBinaryTree<T>.Right =>
_right
;
173
Debug.Assert(_left != null &&
_right
!= null);
182
return
_right
[index - _left._count - 1];
203
Debug.Assert(_left != null &&
_right
!= null);
211
return ref
_right
.ItemRefUnchecked(index - _left._count - 1);
312
Node newRight =
_right
!.Add(key);
340
Node newRight =
_right
!.Insert(index - _left._count - 1, key);
360
Node newRight =
_right
!.AddRange(keys);
377
Node newRight =
_right
!.AddRange(keys);
406
Node newRight =
_right
!.InsertRange(index - _left._count - 1, keys);
421
Debug.Assert(_left != null &&
_right
!= null);
429
if (
_right
.IsEmpty && _left.IsEmpty)
433
else if (
_right
.IsEmpty && !_left.IsEmpty)
437
else if (!
_right
.IsEmpty && _left.IsEmpty)
439
result =
_right
;
445
ImmutableList<T>.Node successor =
_right
;
451
ImmutableList<T>.Node newRight =
_right
.RemoveAt(0);
462
ImmutableList<T>.Node newRight =
_right
.RemoveAt(index - _left._count - 1);
536
ImmutableList<T>.Node newRight =
_right
!.ReplaceAt(index - _left._count - 1, value);
690
int result =
_right
!.BinarySearch(index - thisNodeIndex - 1, count, item, comparer);
707
int result = adjustedCount < 0 ? -1 :
_right
!.BinarySearch(0, adjustedCount, item, comparer);
1286
_right
!.Freeze();
1300
Debug.Assert(!
_right
!.IsEmpty);
1302
return
_right
.MutateLeft(this.MutateRight(
_right
._left!));
1314
return _left.MutateRight(this.MutateLeft(_left.
_right
!));
1324
Debug.Assert(!
_right
!.IsEmpty);
1325
Debug.Assert(!
_right
!._left!.IsEmpty);
1328
Node right =
_right
;
1332
right: right.MutateLeft(rightLeft.
_right
!));
1343
Debug.Assert(!_left.
_right
!.IsEmpty);
1347
Node leftRight = left.
_right
;
1350
right: this.MutateLeft(leftRight.
_right
!));
1364
return
_right
!._height - _left!._height;
1419
return
_right
!.BalanceFactor < 0 ? this.DoubleLeft() : this.RotateLeft();
1433
Debug.Assert(tree._left != null && tree.
_right
!= null);
1445
Debug.Assert(tree.
_right
!= null);
1446
tree.MutateRight(tree.
_right
.BalanceMany());
1495
return new Node(_key, left,
_right
!);
1500
_height = ParentHeight(left,
_right
!);
1501
_count = ParentCount(left,
_right
!);
1559
return new Node(key, _left!,
_right
!);
1606
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));