Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }