public static IEnumerable <T> Cycle <T>(this IEnumerable <T> source) { if (source == null) { throw new ArgumentNullException("source"); } var progressive = new ProgressiveCollection <T>(source); while (true) { foreach (var item in progressive) { yield return(item); } } // Infinite Loop - This method creates an endless IEnumerable<T> }
private ProgressiveSet(Progressor <T> progressor, ISet <T> cache, IEqualityComparer <T>?comparer) { Comparer = comparer ?? EqualityComparer <T> .Default; _wrapped = ProgressiveCollection <T> .Create(progressor, cache, Comparer); }