ImmutableArrayExtensions.SelectMany<TSource,TCollection,TResult> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public:
generic <typename TSource, typename TCollection, typename TResult>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<TResult> ^ SelectMany(System::Collections::Immutable::ImmutableArray<TSource> immutableArray, Func<TSource, System::Collections::Generic::IEnumerable<TCollection> ^> ^ collectionSelector, Func<TSource, TCollection, TResult> ^ resultSelector);
public static System.Collections.Generic.IEnumerable<TResult> SelectMany<TSource,TCollection,TResult> (this System.Collections.Immutable.ImmutableArray<TSource> immutableArray, Func<TSource,System.Collections.Generic.IEnumerable<TCollection>> collectionSelector, Func<TSource,TCollection,TResult> resultSelector);
static member SelectMany : System.Collections.Immutable.ImmutableArray<'Source> * Func<'Source, seq<'Collection>> * Func<'Source, 'Collection, 'Result> -> seq<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TCollection, TResult) (immutableArray As ImmutableArray(Of TSource), collectionSelector As Func(Of TSource, IEnumerable(Of TCollection)), resultSelector As Func(Of TSource, TCollection, TResult)) As IEnumerable(Of TResult)
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.
Parameters
- immutableArray
- ImmutableArray<TSource>
The immutable array.
- collectionSelector
- Func<TSource,IEnumerable<TCollection>>
A transform function to apply to each element of the input sequence.
- resultSelector
- Func<TSource,TCollection,TResult>
A transform function to apply to each element of the intermediate sequence.
Returns
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.
Applies to
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour