Click or drag to resize

GeneratorPadTSource Method (IGeneratorTSource, IEnumerableTSource)

Pads the specified generator with elements from a given list.

Namespace:  Gamelogic.Extensions.Algorithms
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public static IGenerator<TSource> Pad<TSource>(
	this IGenerator<TSource> generator,
	IEnumerable<TSource> padding
)

Parameters

generator
Type: Gamelogic.Extensions.AlgorithmsIGeneratorTSource
The source generator.
padding
Type: System.Collections.GenericIEnumerableTSource
The padding.

Type Parameters

TSource
The type of elements to generate.

Return Value

Type: IGeneratorTSource
IGenerator<TSource>.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IGeneratorTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptiongenerator is null.
ArgumentNullExceptionpadding is null.
Examples
var paddedGenerator = Generator.Count(4).Pad(new List(){7, 8});
//will generate 7 8 0 1 2 3 0 1 2 3...
See Also