187 references to NIL
System.Data.Common (187)
System\Data\RbTree.cs (170)
123
root =
NIL
;
371
Debug.Assert(page._slots[slotId]._leftId ==
NIL
, "node not cleared");
372
Debug.Assert(page._slots[slotId]._rightId ==
NIL
, "node not cleared");
373
Debug.Assert(page._slots[slotId]._parentId ==
NIL
, "node not cleared");
374
Debug.Assert(page._slots[slotId]._nextId ==
NIL
, "node not cleared");
383
if (Right(x_id) !=
NIL
)
387
while (y_id !=
NIL
&& x_id == Right(y_id))
397
if (
NIL
== nodeId)
400
mainTreeNodeId =
NIL
;
406
if ((
NIL
== nodeId) && (
NIL
!= mainTreeNodeId))
409
mainTreeNodeId =
NIL
;
412
if (
NIL
!= nodeId)
414
if (
NIL
!= Next(nodeId))
416
if (
NIL
!= mainTreeNodeId)
432
while (Left(x_id) !=
NIL
)
450
if (Left(y_id) !=
NIL
)
456
if (Parent(x_id) ==
NIL
)
458
if (root_id ==
NIL
)
482
if (x_id !=
NIL
)
484
SetSubTreeSize(x_id, (SubTreeSize(Left(x_id)) + SubTreeSize(Right(x_id)) + (Next(x_id) ==
NIL
? 1 : SubTreeSize(Next(x_id)))));
487
if (y_id !=
NIL
)
489
SetSubTreeSize(y_id, (SubTreeSize(Left(y_id)) + SubTreeSize(Right(y_id)) + (Next(y_id) ==
NIL
? 1 : SubTreeSize(Next(y_id)))));
505
if (Right(y_id) !=
NIL
)
511
if (Parent(x_id) ==
NIL
)
513
if (root_id ==
NIL
)
533
if (x_id !=
NIL
)
535
SetSubTreeSize(x_id, (SubTreeSize(Left(x_id)) + SubTreeSize(Right(x_id)) + (Next(x_id) ==
NIL
? 1 : SubTreeSize(Next(x_id)))));
538
if (y_id !=
NIL
)
540
SetSubTreeSize(y_id, (SubTreeSize(Left(y_id)) + SubTreeSize(Right(y_id)) + (Next(y_id) ==
NIL
? 1 : SubTreeSize(Next(y_id)))));
550
Debug.Assert(
NIL
!= x_id, "nil left");
551
Debug.Assert(
NIL
!= z_id, "nil right");
552
return (root_id ==
NIL
) ? CompareNode(Key(x_id), Key(z_id)) : CompareSatelliteTreeNode(Key(x_id), Key(z_id));
575
int y_id =
NIL
;
576
int z_id = (root_id ==
NIL
) ? root : root_id; //if non NIL, then use the specifid root_id as tree's root.
581
while (z_id !=
NIL
) // in-order traverse and find node with a NILL left or right child
586
int c = (root_id ==
NIL
) ? CompareNode(Key(x_id), Key(z_id)) : CompareSatelliteTreeNode(Key(x_id), Key(z_id));
591
Debug.Assert((
NIL
== Left(z_id)) || (0 > Compare(root_id, Left(z_id), z_id)), "Left is not left");
598
Debug.Assert((
NIL
== Right(z_id)) || (0 < Compare(root_id, Right(z_id), z_id)), "Right is not right");
605
if (root_id !=
NIL
)
609
if (Next(z_id) !=
NIL
)
619
int newMainTreeNodeId =
NIL
;
639
if (Left(z_id) !=
NIL
)
641
if (Right(z_id) !=
NIL
)
649
SetParent(z_id,
NIL
);
650
SetLeft(z_id,
NIL
);
651
SetRight(z_id,
NIL
);
674
while (z_id !=
NIL
) // in-order traverse and find node with a NILL left or right child
690
if (z_id !=
NIL
)
703
if (y_id ==
NIL
)
705
if (root_id ==
NIL
)
725
c = (root_id ==
NIL
) ? CompareNode(Key(x_id), Key(y_id)) : CompareSatelliteTreeNode(Key(x_id), Key(y_id));
739
SetLeft(x_id,
NIL
);
740
SetRight(x_id,
NIL
);
795
if (root_id ==
NIL
)
811
if (Parent(x_id._nodeID) ==
NIL
&& x_id._nodeID != root) //determine if x_id is a satellite root.
834
RBDeleteX(
NIL
, x_id._nodeID, x_id._mainTreeNodeID);
842
return RBDeleteX(
NIL
, z_id,
NIL
);
866
int x_id =
NIL
; // used for holding spliced node (y_id's) child
874
if (Next(z_id) !=
NIL
)
881
if (Next(mNode) !=
NIL
)
891
if (Left(z_id) ==
NIL
|| Right(z_id) ==
NIL
)
896
if (Left(y_id) !=
NIL
)
902
if (x_id !=
NIL
)
905
if (py_id ==
NIL
) // if the spliced node is the root.
908
if (root_id ==
NIL
)
930
if (Next(mNode) !=
NIL
)
934
if (root_id ==
NIL
&& z_id != mNode)
940
if (root_id !=
NIL
)
950
while (tmp_py_id !=
NIL
)
958
if (root_id !=
NIL
)
962
while (nodeId !=
NIL
)
975
if (mNode ==
NIL
|| SubTreeSize(Next(mNode)) != 1)
985
if (Parent(mNode) !=
NIL
)
999
if (Left(mNode) !=
NIL
)
1003
if (Right(mNode) !=
NIL
)
1013
mNode =
NIL
;
1015
else if (Next(mNode) !=
NIL
)
1018
if (root_id ==
NIL
&& z_id != mNode)
1023
if (root_id !=
NIL
)
1038
if (Parent(z_id) !=
NIL
)
1052
SetParent(y_id,
NIL
);
1056
if (Left(z_id) !=
NIL
)
1060
if (Right(z_id) !=
NIL
)
1074
if (mNode !=
NIL
&& Next(mNode) == z_id)
1099
if (x_id ==
NIL
&& px_id ==
NIL
)
1101
return
NIL
; //case of satellite tree root being deleted.
1104
while (((root_id ==
NIL
? root : root_id) != x_id) && color(x_id) == NodeColor.black)
1108
if ((x_id !=
NIL
&& x_id == Left(Parent(x_id))) || (x_id ==
NIL
&& Left(px_id) ==
NIL
))
1112
w_id = (x_id ==
NIL
) ? Right(px_id) : Right(Parent(x_id)); // w is x's right sibling and it cannot be NIL
1114
if (w_id ==
NIL
)
1124
w_id = (x_id ==
NIL
) ? Right(px_id) : Right(Parent(x_id));
1140
w_id = (x_id ==
NIL
) ? Right(px_id) : Right(Parent(x_id));
1148
x_id = (root_id ==
NIL
) ? root : root_id;
1158
if (x_id !=
NIL
)
1162
w_id = (x_id ==
NIL
) ? Left(px_id) : Left(Parent(x_id));
1170
w_id = (x_id ==
NIL
) ? Left(px_id) : Left(Parent(x_id));
1172
if (w_id ==
NIL
)
1192
w_id = (x_id ==
NIL
) ? Left(px_id) : Left(Parent(x_id));
1200
x_id = (root_id ==
NIL
) ? root : root_id;
1212
if (root_id !=
NIL
&& _accessMethod != TreeAccessMethod.KEY_SEARCH_AND_INDEX)
1217
int x_id = (root_id ==
NIL
) ? root : root_id;
1219
while (x_id !=
NIL
)
1221
c = (root_id ==
NIL
) ? CompareNode(key, Key(x_id)) : CompareSatelliteTreeNode(key, Key(x_id));
1229
Debug.Assert((
NIL
== Left(x_id)) || (0 > Compare(root_id, Left(x_id), x_id)), "Search duplicate Left is not left");
1236
Debug.Assert((
NIL
== Right(x_id)) || (0 < Compare(root_id, Right(x_id), x_id)), "Search duplicate Right is not right");
1249
while (x_id !=
NIL
)
1259
Debug.Assert((
NIL
== Left(x_id)) || (0 > Compare(
NIL
, Left(x_id), x_id)), "Search Left is not left");
1266
Debug.Assert((
NIL
== Right(x_id)) || (0 < Compare(
NIL
, Right(x_id), x_id)), "Search Right is not right");
1294
int nodeId = SearchSubTree(
NIL
, key);
1295
if (Next(nodeId) !=
NIL
)
1301
nodeId =
NIL
;
1303
return new NodePath(nodeId,
NIL
);
1314
if (nodeId._nodeID !=
NIL
)
1347
Debug.Assert(
NIL
!= node, "GetIndexByNode(NIL)");
1353
else if (
NIL
!= Next(node))
1362
int mainTreeNodeId = SearchSubTree(
NIL
, Key(node));
1392
else if (
NIL
== path._mainTreeNodeID)
1409
while (nodeId !=
NIL
)
1430
while (nodeId !=
NIL
)
1435
myRank += (SubTreeSize(Left(parent)) + ((Next(parent) ==
NIL
) ? 1 : SubTreeSize(Next(parent))));
1455
satelliteRootId =
NIL
;
1462
if (x_id ==
NIL
)
1479
satelliteRootId =
NIL
;
1483
while (x_id !=
NIL
&& !(((rank = SubTreeSize(Left(x_id)) + 1) == index) && Next(x_id) ==
NIL
))
1489
else if (Next(x_id) !=
NIL
&& index >= rank && index <= rank + SubTreeSize(Next(x_id)) - 1)
1498
if (Next(x_id) ==
NIL
)
1511
while (x_id !=
NIL
)
1513
Debug.Assert(
NIL
== Next(x_id), "has unexpected satellite tree");
1538
if (curNodeId !=
NIL
)
1540
if (Next(curNodeId) !=
NIL
)
1555
RBInsert(
NIL
, nodeId,
NIL
, -1, false);
1564
RBInsert(
NIL
, nodeId,
NIL
, -1, false);
1581
if (nodeId !=
NIL
)
1609
RBInsert(
NIL
, nodeId,
NIL
, position, append);
1698
Debug.Assert(nodeId !=
NIL
, " in SetParent nodeId == NIL");
1709
Debug.Assert(nodeId !=
NIL
, " in SetColor nodeId == NIL");
1740
Debug.Assert(nodeId !=
NIL
&&
1741
(size != 0 || _pageTable[nodeId >> 16]!._slots[nodeId & 0xFFFF]._selfId ==
NIL
) &&
1742
(size != 1 || _pageTable[nodeId >> 16]!._slots[nodeId & 0xFFFF]._nextId ==
NIL
), "SetSize");
1762
int myCorrectSize = SubTreeSize(Left(nodeId)) + SubTreeSize(Right(nodeId)) + (Next(nodeId) ==
NIL
? 1 : SubTreeSize(Next(nodeId)));
1785
int myCorrectSize = SubTreeSize(Left(nodeId)) + SubTreeSize(Right(nodeId)) + (Next(nodeId) ==
NIL
? 1 : SubTreeSize(Next(nodeId)));
1908
Debug.Assert((
NIL
== _nodeID &&
NIL
== _mainTreeNodeID) || (
NIL
!= _nodeID), "MainTreeNodeID is not NIL");
1910
if (
NIL
!= _mainTreeNodeID)
1912
Debug.Assert(
NIL
!= tree.Next(_mainTreeNodeID), "MainTreeNodeID should have a Next");
1914
while (
NIL
!= tree.Parent(node))
1920
if (
NIL
!= _nodeID)
1922
Debug.Assert(
NIL
== tree.Next(_nodeID), "NodeID should not have a Next");
1924
if (
NIL
== _mainTreeNodeID)
1926
while (
NIL
!= tree.Parent(node))
1933
while (
NIL
!= tree.Parent(node))
1935
Debug.Assert(
NIL
== tree.Next(node), "duplicate node should not have a next");
1939
Debug.Assert((
NIL
== _mainTreeNodeID && tree.root == node) ||
2051
_index =
NIL
;
2062
_index =
NIL
;
2068
if (
NIL
== _index)
2116
_index =
NIL
;
System\Data\Selection.cs (17)
510
if (nodeId != IndexTree.
NIL
)
519
if (IndexTree.
NIL
!= nodeId)
529
if (IndexTree.
NIL
!= nodeId)
545
if (IndexTree.
NIL
!= x)
554
while (IndexTree.
NIL
!= x)
564
while (IndexTree.
NIL
!= x)
586
if (IndexTree.
NIL
!= x)
597
while (IndexTree.
NIL
!= x)
612
if (IndexTree.
NIL
!= x)
616
while (IndexTree.
NIL
!= x)
633
while (IndexTree.
NIL
!= x)
648
if (IndexTree.
NIL
== nodeId)
654
if (_records.Next(nodeId) == IndexTree.
NIL
)
823
return (IndexTree.
NIL
!= x_id);
829
return (IndexTree.
NIL
!= x_id);
835
return (IndexTree.
NIL
!= x_id);
1011
if (curNodeId != IndexTree.
NIL
)