public Node(Node parent, IComparable key, object value, bool createNullChildren) { Parent = parent; Key = key; Value = value; CreateNullChildren = createNullChildren; }
public Node AddChild(Node child) { //ValidateKeyAlreadyExists(child.Key); ChildNodes.Add(child.Key, child); return child; }
public Node AddChild(IComparable key, object value) { //ValidateKeyAlreadyExists(key); var child = new Node(this, key, value, CreateNullChildren); return AddChild(child); }