예제 #1
0
        static IEnumerable <CatalogSubject> Descendents(CatalogSubject parent, SystemUri.SchemeSegment scheme)
        {
            foreach (var childType in parent.GetType().GetNestedTypes())
            {
                var child = (CatalogSubject)Activator.CreateInstance(childType, parent);
                yield return(child);

                foreach (var grandchild in Descendents(child, scheme))
                {
                    yield return(grandchild);
                }
            }
        }
예제 #2
0
 public D UncShare(N n, CatalogSubject subject)
 => new D(new D(n, GetUncRoot(n), GetNodeDriveLetter(n)), subject.RelativeLocation);
예제 #3
0
 public IEnumerable <CatalogSubject> Children(CatalogSubject parent)
 => CatalogState.FindDescendents(parent);
예제 #4
0
 public IEnumerable <CatalogSubject> FindDescendents(CatalogSubject parent)
 => SubjectsByType.Values.Where(subect => object.ReferenceEquals(subect.Parent, parent));