3 writes to _left
System.Collections.Immutable (3)
System\Collections\Immutable\ImmutableList_1.Node.cs (3)
89_left = left; 1454_left = left; 1479_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); 1265_left!.Freeze(); 1282return _right.MutateLeft(this.MutateRight(_right._left!)); 1292Debug.Assert(!_left!.IsEmpty); 1294return _left.MutateRight(this.MutateLeft(_left._right!)); 1305Debug.Assert(!_right!._left!.IsEmpty); 1309Node rightLeft = right._left; 1311left: this.MutateRight(rightLeft._left!), 1322Debug.Assert(!_left!.IsEmpty); 1323Debug.Assert(!_left._right!.IsEmpty); 1326Node left = _left; 1329left: left.MutateRight(leftRight._left!), 1344return _right!._height - _left!._height; 1387return _left!.BalanceFactor > 0 ? this.DoubleRight() : this.RotateRight(); 1413Debug.Assert(tree._left != null && tree._right != null); 1419Debug.Assert(tree._left != null); 1420tree.MutateLeft(tree._left.BalanceMany()); 1499return new Node(_key, _left!, right); 1504_height = ParentHeight(_left!, right); 1505_count = ParentCount(_left!, right); 1539return new Node(key, _left!, _right!); 1586private 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));