Example #1
0
 public Hierarchy(Id id, CodeRef root)
     : this(id)
 {
     Contract.AssertNotNull(root, "root");
     
     Root = root;
 }
Example #2
0
        public Hierarchy(Id id, CodeRef root)
            : this(id)
        {
            Contract.AssertNotNull(root, "root");

            Root = root;
        }
Example #3
0
        public void Add(CodeRef child)
        {
            Contract.AssertNotNull(child, "child");
            Contract.AssertNotNull(child.CodeListRef, "child.CodeListRef");
            Contract.AssertNotNull(child.CodeListRef.Alias, "child.CodeListRef.Alias");

            child.Parent = this;
            _children.Add(child);
        }
Example #4
0
        private IEnumerable<CodeRef> GetCodeRefs(CodeRef root)
        {
            yield return root;

            foreach (var child in root.Children)
            {
                foreach (var subchild in GetCodeRefs(child))
                {
                    yield return subchild;
                }
            }
        }
Example #5
0
        private IEnumerable <CodeRef> GetCodeRefs(CodeRef root)
        {
            yield return(root);

            foreach (var child in root.Children)
            {
                foreach (var subchild in GetCodeRefs(child))
                {
                    yield return(subchild);
                }
            }
        }
Example #6
0
 public Hierarchy(InternationalString name, Id id, CodeRef root)
     : this(id, root)
 {
     Name.Add(name);
 }
Example #7
0
        public void Add(CodeRef child)
        {
            Contract.AssertNotNull(child, "child");            
            Contract.AssertNotNull(child.CodeListRef, "child.CodeListRef");
            Contract.AssertNotNull(child.CodeListRef.Alias, "child.CodeListRef.Alias");

            child.Parent = this;
            _children.Add(child);
        }
Example #8
0
 public Hierarchy(InternationalString name, Id id, CodeRef root)
     : this(id, root)
 {
     Name.Add(name);
 }