Click or drag to resize

GeneratorRepeatEachTSource Method (IGeneratorTSource, Int32)

Makes a new generator that will repeat each of the given generators elements a number of times.

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

Parameters

generator
Type: Gamelogic.Extensions.AlgorithmsIGeneratorTSource
The source generator.
repeatCount
Type: SystemInt32
The number of times each element will be generated.

Type Parameters

TSource
The type of the elements of the source generator.

Return Value

Type: IGeneratorTSource
A new generator.

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
ArgumentOutOfRangeExceptionrepeatCount is not positive.
See Also