private HierarchyNode GetNodeFor(Hierarchy hierarchy) { return Nodes.Single(x => x.Context == hierarchy); }
public Unit GetParentWithin(Hierarchy hierarchy) { return GetNodeFor(hierarchy).Parent.Unit; }
public IEnumerable<Unit> GetChildrenWithin(Hierarchy hierarchy) { return GetNodeFor(hierarchy).Children.Select(x => x.Unit); }
private HierarchyNode GetNodeFor(Hierarchy hierarchy) { return(Nodes.Single(x => x.Context == hierarchy)); }
public IEnumerable <Unit> GetChildrenWithin(Hierarchy hierarchy) { return(GetNodeFor(hierarchy).Children.Select(x => x.Unit)); }
public Unit GetParentWithin(Hierarchy hierarchy) { return(GetNodeFor(hierarchy).Parent.Unit); }