protected Element(VaultBase vault, String name, IEnumerable <Element> children) { Vault = vault.AssertNotNull(); Bind(Vault); // setting parent auto-adds the child to this collection // so it should be initialized as an empty one _children = new IndexedNodeCollection(this); (children ?? Enumerable.Empty <Element>()).ForEach(c => c.Parent = (Branch)this); Name = name; _metadata = new Metadata(this); }
protected Element(VaultBase vault, String name, IEnumerable<Element> children) { Vault = vault.AssertNotNull(); Bind(Vault); // setting parent auto-adds the child to this collection // so it should be initialized as an empty one _children = new IndexedNodeCollection(this); (children ?? Enumerable.Empty<Element>()).ForEach(c => c.Parent = (Branch)this); Name = name; _metadata = new Metadata(this); }