Method SelectMany
- Namespace
- Gamelogic.Extensions.Algorithms
- Assembly
- Gamelogic.Extensions.dll
SelectMany<TSource, TResult>(IGenerator<TSource>, Func<TSource, IEnumerable<TResult>>)
For each item in the source generator, a list of items is generated, but the items are generated one by one (and not as a list of items).
public static IGenerator<TResult> SelectMany<TSource, TResult>(this IGenerator<TSource> generator, Func<TSource, IEnumerable<TResult>> selector)
Parameters
generator
IGenerator<TSource>The generator.
selector
Func<TSource, IEnumerable<TResult>>The function that transform elements of the source generator to a list of items.
Returns
- IGenerator<TResult>
IGenerator<TResult>.
Type Parameters
TSource
The type of the source generator.
TResult
The type of the result generator.
Exceptions
- ArgumentNullException
generator or selector