ImmutableArrayExtensions::SelectMany<TSource, TCollection, TResult> Method (ImmutableArray<TSource>, Func<TSource, IEnumerable<TCollection>^>^, Func<TSource, TCollection, TResult>^)
Projects each element of a sequence to an IEnumerable<T>, flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein.
Assembly: System.Collections.Immutable (in System.Collections.Immutable.dll)
public: generic<typename TSource, typename TCollection, typename TResult> [ExtensionAttribute] static IEnumerable<TResult>^ SelectMany( ImmutableArray<TSource> immutableArray, Func<TSource, IEnumerable<TCollection>^>^ collectionSelector, Func<TSource, TCollection, TResult>^ resultSelector )
Parameters
- immutableArray
-
Type:
System.Collections.Immutable::ImmutableArray<TSource>
The immutable array.
- collectionSelector
-
Type:
System::Func<TSource, IEnumerable<TCollection>^>^
A transform function to apply to each element of the input sequence.
- resultSelector
-
Type:
System::Func<TSource, TCollection, TResult>^
A transform function to apply to each element of the intermediate sequence.
Return Value
Type: System.Collections.Generic::IEnumerable<TResult>^An IEnumerable<T> whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of immutableArray and then mapping each of those sequence elements and their corresponding source element to a result element.
Type Parameters
- TSource
The type of the elements of immutableArray.
- TCollection
The type of the intermediate elements collected by collectionSelector.
- TResult
The type of the elements of the resulting sequence.