Click or drag to resize

GeneratorRepeatEachTSource Method (IGeneratorTSource, IGeneratorInt32)

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,
	IGenerator<int> repeatCountGenerator
)

Parameters

generator
Type: Gamelogic.Extensions.AlgorithmsIGeneratorTSource
The source generator.
repeatCountGenerator
Type: Gamelogic.Extensions.AlgorithmsIGeneratorInt32
A generator used to get 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
ArgumentNullExceptionrepeatCountGenerator is null.
See Also