Beispiel #1
0
        public Node2 AddChild(object key, object value)
        {
            //ValidateKeyAlreadyExists(key);

            var child = new Node2(this, key, CreateNullChildren);
            var node = AddChild(child);

            if (value != null)
            {
                var nodeValue = new Node2(node, key, CreateNullChildren);
                AddChild(nodeValue);
            }

            return node;
        }
Beispiel #2
0
        public Node2 AddChild(Node2 child)
        {
            //ValidateKeyAlreadyExists(child.Key);

            ChildNodes.Add(child.Key, child);

            return child;
        }
Beispiel #3
0
 public Node2(Node2 parent, object key, bool createNullChildren)
 {
     Parent = parent;
     Key = key;
     CreateNullChildren = createNullChildren;
 }