ImmutableArrayExtensions.SelectMany<TSource,TCollection,TResult> Metódus
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Egy sorozat egyes elemeit egy-egy IEnumerable<T>sorozatra kivetíti, az eredményül kapott sorozatokat egy sorozatba alakítja, és meghív egy eredményválasztó függvényt az egyes elemeken.
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)
Típusparaméterek
- TSource
A . elemeinek immutableArraytípusa.
- TCollection
Az összegyűjtött collectionSelectorköztes elemek típusa.
- TResult
Az eredményként kapott sorozat elemeinek típusa.
Paraméterek
- immutableArray
- ImmutableArray<TSource>
A nem módosítható tömb.
- collectionSelector
- Func<TSource,IEnumerable<TCollection>>
A bemeneti sorozat minden elemére alkalmazandó átalakítási függvény.
- resultSelector
- Func<TSource,TCollection,TResult>
A köztes sorozat minden elemére alkalmazandó átalakítási függvény.
Válaszok
Egy IEnumerable<T> olyan elem, amelynek elemei az egy-a-többhöz átalakítási függvény collectionSelector meghívásának immutableArray eredménye, majd az egyes sorozatelemek és a hozzájuk tartozó forráselem egy eredményelemhez való hozzárendelése.