Click or drag to resize

GeneratorSwitchAfterTSource Method

Generates elements from a source generator for the given number of steps, then switches to a second generator.

Namespace:  Gamelogic.Extensions.Algorithms
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public static IGenerator<TSource> SwitchAfter<TSource>(
	this IGenerator<TSource> source,
	int steps,
	IGenerator<TSource> newGenerator
)

Parameters

source
Type: Gamelogic.Extensions.AlgorithmsIGeneratorTSource
The source generator that will be used before the switch.
steps
Type: SystemInt32
The number of steps before switching.
newGenerator
Type: Gamelogic.Extensions.AlgorithmsIGeneratorTSource
The new generator that will be used after the switch.

Type Parameters

TSource
The type 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
ArgumentNullExceptionsource is null
ArgumentNullExceptionnewGenerator is null
See Also