protected static IReadOnlyList <TreeOrphan> GetEnumerableChildren <TTreeOrphan>(IEnumerable <TTreeOrphan> children) where TTreeOrphan : TreeOrphan { if (children == null) { return(new OrphanList <TTreeOrphan>()); } else { if (children is CachedEnumerableIterator <TTreeOrphan> ) { return(new OrphanList <TTreeOrphan>(new LazyOrphanList(children))); } else { #if DEBUG var orphanList = new OrphanList <TTreeOrphan>(children); Debug.Assert(!orphanList.Contains(null), "TreeOrphans cannot contain null children"); return(orphanList); #else return(new OrphanList <TTreeOrphan>(children)); #endif } } }
public OrphanListDebugView(OrphanList <TOrphan> list) { this.list = list; }
/// <summary> /// Initializes a new instance of the <see cref="OrphanList{TOrphan}"/> class with an orphan list. /// </summary> /// <param name="list">The list this type will encapsulate.</param> internal OrphanList(OrphanList list) { this.list = list; }