GeneratorPadTSource Method (IGeneratorTSource, IEnumerableTSource) |
Namespace: Gamelogic.Extensions.Algorithms
public static IGenerator<TSource> Pad<TSource>( this IGenerator<TSource> generator, IEnumerable<TSource> padding )
| Exception | Condition |
|---|---|
| ArgumentNullException | generator is null. |
| ArgumentNullException | padding is null. |
var paddedGenerator = Generator.Count(4).Pad(new List(){7, 8}); //will generate 7 8 0 1 2 3 0 1 2 3...