public Hierarchy(Id id, CodeRef root) : this(id) { Contract.AssertNotNull(root, "root"); Root = root; }
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); }
private IEnumerable<CodeRef> GetCodeRefs(CodeRef root) { yield return root; foreach (var child in root.Children) { foreach (var subchild in GetCodeRefs(child)) { yield return subchild; } } }
private IEnumerable <CodeRef> GetCodeRefs(CodeRef root) { yield return(root); foreach (var child in root.Children) { foreach (var subchild in GetCodeRefs(child)) { yield return(subchild); } } }
public Hierarchy(InternationalString name, Id id, CodeRef root) : this(id, root) { Name.Add(name); }