Projects each element of a collection to a sequence of collections, flattens the resulting collections into one collection, and invokes a result selector function on each element therein.

Namespace:  C1.LiveLinq
Assembly:  C1.LiveLinq (in C1.LiveLinq.dll)

Syntax

C#
public static IIndexedSource<TResult> SelectMany<TSource, TCollection, TResult>(
	this IIndexedSource<TSource> source,
	Expression<Func<TSource, IEnumerable<TCollection>>> collectionSelector,
	Expression<Func<TSource, TCollection, TResult>> resultSelector
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function SelectMany(Of TSource, TCollection, TResult) ( _
	source As IIndexedSource(Of TSource), _
	collectionSelector As Expression(Of Func(Of TSource, IEnumerable(Of TCollection))), _
	resultSelector As Expression(Of Func(Of TSource, TCollection, TResult)) _
) As IIndexedSource(Of TResult)

Parameters

source
Type: C1.LiveLinq.Indexing..::..IIndexedSource<(Of <(<'TSource>)>)>
A collection of values to project.
collectionSelector
Type: System.Linq.Expressions..::..Expression<(Of <(<'Func<(Of <(<'TSource, IEnumerable<(Of <(<'TCollection>)>)>>)>)>>)>)>
A transform function to apply to each element of the input collection.
resultSelector
Type: System.Linq.Expressions..::..Expression<(Of <(<'Func<(Of <(<'TSource, TCollection, TResult>)>)>>)>)>
A transform function to apply to each element of the intermediate sequence.

Type Parameters

TSource
The type of the elements of source.
TCollection
The type of the intermediate elements collected by collectionSelector.
TResult
The type of the elements of the resulting collection.

Return Value

An IIndexedSource<TResult> whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of source and then mapping each of those sequence elements and their corresponding source element to a result element.

See Also