3 writes to _left
System.Collections.Immutable (3)
System\Collections\Immutable\ImmutableList_1.Node.cs (3)
89_left = left; 1463_left = left; 1488_left = left;
60 references to _left
System.Collections.Immutable (60)
System\Collections\Immutable\ImmutableList_1.Node.cs (60)
108Debug.Assert(!(_left == null ^ _right == null)); 109return _left == null; 121public Node? Left => _left; 153Debug.Assert(_left != null && _right != null); 155if (index < _left._count) 157return _left[index]; 160if (index > _left._count) 162return _right[index - _left._count - 1]; 183Debug.Assert(_left != null && _right != null); 184if (index < _left._count) 186return ref _left.ItemRefUnchecked(index); 189if (index > _left._count) 191return ref _right.ItemRefUnchecked(index - _left._count - 1); 312if (index <= _left!._count) 314Node newLeft = _left.Insert(index, key); 320Node newRight = _right!.Insert(index - _left._count - 1, key); 379if (index <= _left!._count) 381Node newLeft = _left.InsertRange(index, keys); 386Node newRight = _right!.InsertRange(index - _left._count - 1, keys); 401Debug.Assert(_left != null && _right != null); 404if (index == _left._count) 409if (_right.IsEmpty && _left.IsEmpty) 413else if (_right.IsEmpty && !_left.IsEmpty) 415result = _left; 417else if (!_right.IsEmpty && _left.IsEmpty) 426while (!successor._left!.IsEmpty) 428successor = successor._left; 432result = successor.MutateBoth(left: _left, right: newRight); 435else if (index < _left._count) 437ImmutableList<T>.Node newLeft = _left.RemoveAt(index); 442ImmutableList<T>.Node newRight = _right.RemoveAt(index - _left._count - 1); 504if (index == _left!._count) 509else if (index < _left._count) 511ImmutableList<T>.Node newLeft = _left.ReplaceAt(index, value); 516ImmutableList<T>.Node newRight = _right!.ReplaceAt(index - _left._count - 1, value); 663int thisNodeIndex = _left!.Count; // this is only the index within the AVL tree, treating this node as root rather than a member of a larger tree. 666return _left.BinarySearch(index, count, item, comparer); 699int result = _left.BinarySearch(index, count, item, comparer); 1274_left!.Freeze(); 1291return _right.MutateLeft(this.MutateRight(_right._left!)); 1301Debug.Assert(!_left!.IsEmpty); 1303return _left.MutateRight(this.MutateLeft(_left._right!)); 1314Debug.Assert(!_right!._left!.IsEmpty); 1318Node rightLeft = right._left; 1320left: this.MutateRight(rightLeft._left!), 1331Debug.Assert(!_left!.IsEmpty); 1332Debug.Assert(!_left._right!.IsEmpty); 1335Node left = _left; 1338left: left.MutateRight(leftRight._left!), 1353return _right!._height - _left!._height; 1396return _left!.BalanceFactor > 0 ? this.DoubleRight() : this.RotateRight(); 1422Debug.Assert(tree._left != null && tree._right != null); 1428Debug.Assert(tree._left != null); 1429tree.MutateLeft(tree._left.BalanceMany()); 1508return new Node(_key, _left!, right); 1513_height = ParentHeight(_left!, right); 1514_count = ParentCount(_left!, right); 1548return new Node(key, _left!, _right!); 1595private 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));