3 writes to _left
System.Collections.Immutable (3)
System\Collections\Immutable\ImmutableList_1.Node.cs (3)
89_left = left; 1474_left = left; 1499_left = left;
62 references to _left
System.Collections.Immutable (62)
System\Collections\Immutable\ImmutableList_1.Node.cs (62)
108Debug.Assert(!(_left == null ^ _right == null)); 109return _left == null; 121public Node? Left => _left; 126IBinaryTree? IBinaryTree.Left => _left; 141IBinaryTree<T>? IBinaryTree<T>.Left => _left; 173Debug.Assert(_left != null && _right != null); 175if (index < _left._count) 177return _left[index]; 180if (index > _left._count) 182return _right[index - _left._count - 1]; 203Debug.Assert(_left != null && _right != null); 204if (index < _left._count) 206return ref _left.ItemRefUnchecked(index); 209if (index > _left._count) 211return ref _right.ItemRefUnchecked(index - _left._count - 1); 332if (index <= _left!._count) 334Node newLeft = _left.Insert(index, key); 340Node newRight = _right!.Insert(index - _left._count - 1, key); 399if (index <= _left!._count) 401Node newLeft = _left.InsertRange(index, keys); 406Node newRight = _right!.InsertRange(index - _left._count - 1, keys); 421Debug.Assert(_left != null && _right != null); 424if (index == _left._count) 429if (_right.IsEmpty && _left.IsEmpty) 433else if (_right.IsEmpty && !_left.IsEmpty) 435result = _left; 437else if (!_right.IsEmpty && _left.IsEmpty) 446while (!successor._left!.IsEmpty) 448successor = successor._left; 452result = successor.MutateBoth(left: _left, right: newRight); 455else if (index < _left._count) 457ImmutableList<T>.Node newLeft = _left.RemoveAt(index); 462ImmutableList<T>.Node newRight = _right.RemoveAt(index - _left._count - 1); 524if (index == _left!._count) 529else if (index < _left._count) 531ImmutableList<T>.Node newLeft = _left.ReplaceAt(index, value); 536ImmutableList<T>.Node newRight = _right!.ReplaceAt(index - _left._count - 1, value); 683int 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. 686return _left.BinarySearch(index, count, item, comparer); 719int result = _left.BinarySearch(index, count, item, comparer); 1285_left!.Freeze(); 1302return _right.MutateLeft(this.MutateRight(_right._left!)); 1312Debug.Assert(!_left!.IsEmpty); 1314return _left.MutateRight(this.MutateLeft(_left._right!)); 1325Debug.Assert(!_right!._left!.IsEmpty); 1329Node rightLeft = right._left; 1331left: this.MutateRight(rightLeft._left!), 1342Debug.Assert(!_left!.IsEmpty); 1343Debug.Assert(!_left._right!.IsEmpty); 1346Node left = _left; 1349left: left.MutateRight(leftRight._left!), 1364return _right!._height - _left!._height; 1407return _left!.BalanceFactor > 0 ? this.DoubleRight() : this.RotateRight(); 1433Debug.Assert(tree._left != null && tree._right != null); 1439Debug.Assert(tree._left != null); 1440tree.MutateLeft(tree._left.BalanceMany()); 1519return new Node(_key, _left!, right); 1524_height = ParentHeight(_left!, right); 1525_count = ParentCount(_left!, right); 1559return new Node(key, _left!, _right!); 1606private 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));