163 references to NIL
System.Data (163)
fx\src\data\System\Data\RbTree.cs (146)
121
root =
NIL
;
367
Debug.Assert(page.Slots[slotId].leftId ==
NIL
, "node not cleared");
368
Debug.Assert(page.Slots[slotId].rightId ==
NIL
, "node not cleared");
369
Debug.Assert(page.Slots[slotId].parentId ==
NIL
, "node not cleared");
370
Debug.Assert(page.Slots[slotId].nextId ==
NIL
, "node not cleared");
379
if (Right (x_id) !=
NIL
)
383
while (y_id !=
NIL
&& x_id == Right (y_id))
393
if (
NIL
== nodeId)
396
mainTreeNodeId =
NIL
;
402
if ((
NIL
== nodeId) && (
NIL
!= mainTreeNodeId))
405
mainTreeNodeId =
NIL
;
408
if (
NIL
!= nodeId)
410
if (
NIL
!= Next(nodeId))
412
if (
NIL
!= mainTreeNodeId)
428
while (Left (x_id) !=
NIL
) {
445
if (Left (y_id) !=
NIL
) {
450
if (Parent (x_id) ==
NIL
) {
451
if (root_id ==
NIL
) {
471
if (x_id !=
NIL
) {
472
SetSubTreeSize(x_id, (SubTreeSize(Left(x_id)) + SubTreeSize(Right(x_id)) + (Next(x_id) ==
NIL
? 1 : SubTreeSize(Next(x_id)))));
475
if (y_id !=
NIL
) {
476
SetSubTreeSize(y_id, (SubTreeSize(Left(y_id)) + SubTreeSize(Right(y_id)) + (Next(y_id) ==
NIL
? 1 : SubTreeSize(Next(y_id)))));
492
if (Right (y_id) !=
NIL
) {
497
if (Parent (x_id) ==
NIL
) {
498
if (root_id ==
NIL
) {
516
if (x_id !=
NIL
) {
517
SetSubTreeSize(x_id, (SubTreeSize(Left(x_id)) + SubTreeSize(Right(x_id)) + (Next(x_id) ==
NIL
? 1 : SubTreeSize(Next(x_id)))));
520
if (y_id !=
NIL
) {
521
SetSubTreeSize(y_id, (SubTreeSize(Left(y_id)) + SubTreeSize(Right(y_id)) + (Next(y_id) ==
NIL
? 1 : SubTreeSize(Next(y_id)))));
555
int y_id =
NIL
;
556
int z_id = (root_id ==
NIL
) ? root : root_id; //if non NIL, then use the specifid root_id as tree's root.
561
while (z_id !=
NIL
) // in-order traverse and find node with a NILL left or right child
566
int c = (root_id ==
NIL
) ? CompareNode (Key (x_id), Key (z_id)) : CompareSateliteTreeNode (Key (x_id), Key (z_id));
582
if (root_id !=
NIL
) {
585
if (Next(z_id) !=
NIL
) {
593
int newMainTreeNodeId =
NIL
;
613
if (Left(z_id) !=
NIL
)
615
if (Right(z_id) !=
NIL
)
623
SetParent(z_id,
NIL
);
624
SetLeft(z_id,
NIL
);
625
SetRight(z_id,
NIL
);
647
while (z_id !=
NIL
) // in-order traverse and find node with a NILL left or right child
661
if (z_id !=
NIL
) {
672
if (y_id ==
NIL
)
674
if (root_id ==
NIL
) {
693
c = (root_id ==
NIL
) ? CompareNode (Key(x_id), Key(y_id)) : CompareSateliteTreeNode (Key (x_id), Key (y_id));
706
SetLeft (x_id,
NIL
);
707
SetRight (x_id,
NIL
);
762
if (root_id ==
NIL
)
778
if (Parent(x_id.NodeID) ==
NIL
&& x_id.NodeID != root) //determine if x_id is a satellite root.
801
RBDeleteX(
NIL
, x_id.NodeID, x_id.MainTreeNodeID);
809
return RBDeleteX (
NIL
, z_id,
NIL
);
833
int x_id =
NIL
; // used for holding spliced node (y_id's) child
841
if (Next (z_id) !=
NIL
)
848
if (Next (mNode) !=
NIL
)
857
if (Left (z_id) ==
NIL
|| Right (z_id) ==
NIL
)
862
if (Left (y_id) !=
NIL
)
868
if (x_id !=
NIL
)
871
if (py_id ==
NIL
) // if the spliced node is the root.
874
if (root_id ==
NIL
)
896
if (Next(mNode) !=
NIL
)
900
if (root_id ==
NIL
&& z_id != mNode) {
905
if (root_id !=
NIL
)
915
while (tmp_py_id !=
NIL
)
923
if (root_id !=
NIL
)
927
while (nodeId !=
NIL
)
940
if (mNode ==
NIL
|| SubTreeSize(Next(mNode)) != 1) {
949
if (Parent(mNode) !=
NIL
)
961
if (Left(mNode) !=
NIL
) {
964
if (Right(mNode) !=
NIL
) {
972
mNode =
NIL
;
974
else if (Next(mNode) !=
NIL
)
977
if (root_id ==
NIL
&& z_id != mNode) { //if mNode being deleted, its OK for root_id (it should be) NIL.
981
if (root_id !=
NIL
)
997
if (Parent(z_id) !=
NIL
)
1008
SetParent(y_id,
NIL
);
1012
if (Left(z_id) !=
NIL
) {
1015
if (Right(z_id) !=
NIL
) {
1026
if (mNode !=
NIL
&& Next(mNode) == z_id) {
1050
if (x_id ==
NIL
&& px_id ==
NIL
) {
1051
return
NIL
; //case of satelite tree root being deleted.
1054
while (((root_id ==
NIL
? root : root_id) != x_id) && color (x_id) == NodeColor.black)
1058
if ((x_id !=
NIL
&& x_id == Left (Parent (x_id))) || (x_id ==
NIL
&& Left (px_id) ==
NIL
))
1062
w_id = (x_id ==
NIL
) ? Right (px_id) : Right (Parent (x_id)); // w is x's right sibling and it cannot be NIL
1064
if (w_id ==
NIL
) {
1073
w_id = (x_id ==
NIL
) ? Right (px_id) : Right (Parent (x_id));
1089
w_id = (x_id ==
NIL
) ? Right (px_id) : Right (Parent (x_id));
1097
x_id = (root_id ==
NIL
) ? root : root_id;
1107
if (x_id !=
NIL
) {
1110
w_id = (x_id ==
NIL
) ? Left (px_id) : Left (Parent (x_id));
1117
w_id = (x_id ==
NIL
) ? Left (px_id) : Left (Parent (x_id));
1119
if (w_id ==
NIL
) {
1136
w_id = (x_id ==
NIL
) ? Left (px_id) : Left (Parent (x_id));
1139
if (x_id !=
NIL
)
1146
x_id = (root_id ==
NIL
) ? root : root_id;
1156
x_id = (root_id ==
NIL
) ? root : root_id;
1169
if (root_id !=
NIL
&& _accessMethod!=TreeAccessMethod.KEY_SEARCH_AND_INDEX) {
1173
int x_id = (root_id ==
NIL
) ? root : root_id;
1175
while (x_id !=
NIL
)
1177
c = (root_id ==
NIL
) ? CompareNode (key, Key (x_id)) : CompareSateliteTreeNode (key, Key (x_id));
1202
while (x_id !=
NIL
)
1244
int nodeId = SearchSubTree(
NIL
, key);
1245
if (Next (nodeId) !=
NIL
) {
1249
nodeId =
NIL
;
1251
return new NodePath(nodeId,
NIL
);
1262
if (nodeId.NodeID !=
NIL
) {
1294
Debug.Assert(
NIL
!= node, "GetIndexByNode(NIL)");
1300
else if (
NIL
!= Next(node))
1309
int mainTreeNodeId = SearchSubTree(
NIL
, Key(node));
1339
else if (
NIL
== path.MainTreeNodeID)
1355
while (nodeId !=
NIL
)
1375
while (nodeId !=
NIL
)
1380
myRank += (SubTreeSize(Left(parent)) + ((Next(parent) ==
NIL
) ? 1 : SubTreeSize(Next(parent))));
1399
satelliteRootId =
NIL
;
1405
if (x_id ==
NIL
) {
1419
satelliteRootId =
NIL
;
1423
while (x_id !=
NIL
&& !(((rank = SubTreeSize (Left (x_id)) + 1) == index) && Next (x_id) ==
NIL
))
1428
else if (Next (x_id) !=
NIL
&& index >= rank && index <= rank + SubTreeSize (Next (x_id)) - 1)
1437
if (Next (x_id) ==
NIL
)
1449
while (x_id !=
NIL
) {
1450
Debug.Assert(
NIL
== Next(x_id), "has unexpected satellite tree");
1489
RBInsert (
NIL
, nodeId,
NIL
, -1, false);
1498
RBInsert(
NIL
, nodeId,
NIL
, -1, false);
1514
if (nodeId !=
NIL
)
1539
RBInsert (
NIL
, nodeId,
NIL
, position, append);
1617
Debug.Assert(nodeId !=
NIL
, " in SetParent nodeId == NIL");
1628
Debug.Assert(nodeId !=
NIL
, " in SetColor nodeId == NIL");
1659
Debug.Assert(nodeId !=
NIL
&&
1660
(size != 0 || _pageTable[nodeId >> 16].Slots[nodeId & 0xFFFF].selfId ==
NIL
) &&
1661
(size != 1 || _pageTable[nodeId >> 16].Slots[nodeId & 0xFFFF].nextId ==
NIL
), "SetSize");
1681
int myCorrectSize = SubTreeSize (Left (nodeId)) + SubTreeSize (Right (nodeId)) + (Next (nodeId) ==
NIL
? 1 : SubTreeSize (Next (nodeId)));
1703
int myCorrectSize = SubTreeSize(Left(nodeId)) + SubTreeSize(Right(nodeId)) + (Next(nodeId) ==
NIL
? 1 : SubTreeSize(Next(nodeId)));
1965
index =
NIL
;
1976
index =
NIL
;
1982
if (
NIL
== index)
2020
index =
NIL
;
fx\src\data\System\Data\Selection.cs (17)
507
if (nodeId!=IndexTree.
NIL
)
515
if (IndexTree.
NIL
!= nodeId) {
523
if (IndexTree.
NIL
!= nodeId) {
536
if (IndexTree.
NIL
!= x) { // otherwise storage may not exist
542
while (IndexTree.
NIL
!= x) {
550
while (IndexTree.
NIL
!= x) {
569
if (IndexTree.
NIL
!= x) { // otherwise storage may not exist
577
while (IndexTree.
NIL
!= x) {
590
if (IndexTree.
NIL
!= x) { // otherwise storage may not exist
592
while (IndexTree.
NIL
!= x) {
609
while (IndexTree.
NIL
!= x)
624
if (IndexTree.
NIL
== nodeId) {
629
if (records.Next (nodeId) == IndexTree.
NIL
)
780
return (IndexTree.
NIL
!= x_id);
785
return (IndexTree.
NIL
!= x_id);
790
return (IndexTree.
NIL
!= x_id);
942
if (curNodeId != IndexTree.
NIL
) {