Table of Contents

Method Interleave

Namespace
Gamelogic.Extensions.Algorithms
Assembly
Gamelogic.Extensions.dll

Interleave<TSource>(IGenerator<TSource>, params IGenerator<TSource>[])

Makes a generator that interleaves the elements of the specified generators.

public static IGenerator<TSource> Interleave<TSource>(IGenerator<TSource> generator, params IGenerator<TSource>[] sources)

Parameters

generator IGenerator<TSource>

The first generator.

sources IGenerator<TSource>[]

The other generators.

Returns

IGenerator<TSource>

A new generator.

Type Parameters

TSource

The type of elements to generate.

Exceptions

ArgumentNullException

generator is $(null)

ArgumentException

Any of generators is null.

Interleave<TSource>(IList<IGenerator<TSource>>)

Makes a generator that interleaves the elements of the specified generators.

public static IGenerator<TSource> Interleave<TSource>(IList<IGenerator<TSource>> sources)

Parameters

sources IList<IGenerator<TSource>>

The source generators.

Returns

IGenerator<TSource>

A new generator.

Type Parameters

TSource

The type of elements to generate.

Exceptions

ArgumentNullException

generators is null.

ArgumentException

generators is empty.

ArgumentException

Any of generators is null.