public UnionIteratorN(SingleLinkedNode <IEnumerable <TSource> > sources, int headIndex, IEqualityComparer <TSource> comparer) : base(comparer) { Debug.Assert(headIndex >= 2); Debug.Assert(sources?.GetCount() == headIndex + 1); _sources = sources; _headIndex = headIndex; }
public AppendPrependN(IEnumerable <TSource> source, SingleLinkedNode <TSource> prepended, SingleLinkedNode <TSource> appended, int prependCount, int appendCount) : base(source) { Debug.Assert(prepended != null || appended != null); Debug.Assert(prependCount > 0 || appendCount > 0); Debug.Assert(prependCount + appendCount >= 2); Debug.Assert((prepended?.GetCount() ?? 0) == prependCount); Debug.Assert((appended?.GetCount() ?? 0) == appendCount); _prepended = prepended; _appended = appended; _prependCount = prependCount; _appendCount = appendCount; }