Esempio n. 1
0
 /// <summary>
 /// Creates a generator that produces infinite enumerables, the elements of which are produced by the given
 /// generator. Infinite enumerables are supported by this generator, but by default there is a limit of 1000
 /// elements in place - and the iterator will throw if that limit is exceeded. This is a pragmatic limit to
 /// avert confusion of cases where the consuming code trys to enumerate an infinite enumerable (and
 /// consequently hangs forever).
 /// </summary>
 /// <param name="elementGen">The generator used to produce the elements of the list.</param>
 /// <param name="iterationLimit">The hard iteration limit that should be applied to the generator.</param>
 /// <returns>The new generator.</returns>
 public static IGen <IEnumerable <T> > InfiniteOf <T>(this IGen <T> elementGen, int?iterationLimit = 1000) =>
 Gen.Infinite(elementGen, iterationLimit);