internal void SetRootLink(DTreeRoot <T> root) { if (mRoot != root) // assume sub trees are consistent { mRoot = root; if (HasChildren) { foreach (DTreeNode <T> n in Nodes) { n.SetRootLink(root); } } } }
/// <summary> /// creates a new root node, and sets Value to value. /// </summary> /// <param name="value"></param> public DTreeNode(T value) { mValue = value; mRoot = new DTreeRoot <T>(this); }
public DTreeNode() { mValue = default(T); mRoot = new DTreeRoot <T>(this); }