System\Collections\Generic\SortedSet.cs (16)
308root = new Node(item, NodeColor.Black);
357Node node = new Node(item, NodeColor.Red);
948root = new Node(arr[startIndex], NodeColor.Black);
955root = new Node(arr[startIndex], NodeColor.Black);
956root.Right = new Node(arr[endIndex], NodeColor.Black);
964root = new Node(arr[startIndex + 1], NodeColor.Black);
965root.Left = new Node(arr[startIndex], NodeColor.Black);
966root.Right = new Node(arr[endIndex], NodeColor.Black);
974root = new Node(arr[midpt], NodeColor.Black);
977ConstructRootFromSortedArray(arr, midpt + 2, endIndex, new Node(arr[midpt + 1], NodeColor.Red)) :
1596public Node(T item, NodeColor color)
1614public NodeColor Color { get; set; }
1616public bool IsBlack => Color == NodeColor.Black;
1618public bool IsRed => Color == NodeColor.Red;
1624public void ColorBlack() => Color = NodeColor.Black;
1626public void ColorRed() => Color = NodeColor.Red;