語言

AsyncEnumerable.SelectMany 方法

定義

多載

名稱 Description
SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,IAsyncEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

將序列中的每個元素投影為 IAsyncEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。 每個來源專案的索引會用於該專案的中繼投影形式。

SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<IEnumerable<TCollection>>>, Func<TSource,TCollection,CancellationToken,ValueTask<TResult>>)

將序列中的每個元素投影為 IEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。 每個來源專案的索引會用於該專案的中繼投影形式。

SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,CancellationToken,ValueTask<IEnumerable<TCollection>>>, Func<TSource,TCollection,CancellationToken,ValueTask<TResult>>)

將序列中的每個元素投影為 IEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。

SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

將序列中的每個元素投影為 IEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。

SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,IAsyncEnumerable<TCollection>>, Func<TSource, TCollection,CancellationToken,ValueTask<TResult>>)

將序列中的每個元素投影為 IAsyncEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。

SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

將序列中的每個元素投影為 IEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。 每個來源專案的索引會用於該專案的中繼投影形式。

SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,IAsyncEnumerable<TCollection>>, Func<TSource,TCollection, CancellationToken,ValueTask<TResult>>)

將序列中的每個元素投影為 IAsyncEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。 每個來源專案的索引會用於該專案的中繼投影形式。

SelectMany<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TResult>>)

將序列中的每個元素投影為 , IEnumerable<T> 並將所得序列平展成一個 IAsyncEnumerable<T> 序列。 每個來源專案的索引會以該專案的投影形式使用。

SelectMany<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,CancellationToken,ValueTask<IEnumerable<TResult>>>)

將序列中的每個元素投影為 , IEnumerable<T> 並將所得序列平展成一個 IAsyncEnumerable<T> 序列。 每個來源專案的索引會以該專案的投影形式使用。

SelectMany<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<IEnumerable<TResult>>>)

將序列中的每個元素投影為 , IEnumerable<T> 並將所得序列平展成一個 IAsyncEnumerable<T> 序列。

SelectMany<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,IAsyncEnumerable<TResult>>)

將序列中的每個元素投影為 , IAsyncEnumerable<T> 並將所得序列平展成一個 IAsyncEnumerable<T> 序列。 每個來源專案的索引會以該專案的投影形式使用。

SelectMany<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,IEnumerable<TResult>>)

將序列中的每個元素投影為 , IEnumerable<T> 並將所得序列平展成一個 IAsyncEnumerable<T> 序列。

SelectMany<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,IAsyncEnumerable<TResult>>)

將序列中的每個元素投影為 , IAsyncEnumerable<T> 並將所得序列平展成一個 IAsyncEnumerable<T> 序列。

SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,IAsyncEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

來源:
SelectMany.cs
來源:
SelectMany.cs
來源:
SelectMany.cs

將序列中的每個元素投影為 IAsyncEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。 每個來源專案的索引會用於該專案的中繼投影形式。

public:
generic <typename TSource, typename TCollection, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ SelectMany(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, System::Collections::Generic::IAsyncEnumerable<TCollection> ^> ^ collectionSelector, Func<TSource, TCollection, TResult> ^ resultSelector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> SelectMany<TSource,TCollection,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,System.Collections.Generic.IAsyncEnumerable<TCollection>> collectionSelector, Func<TSource,TCollection,TResult> resultSelector);
static member SelectMany : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, System.Collections.Generic.IAsyncEnumerable<'Collection>> * Func<'Source, 'Collection, 'Result> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TCollection, TResult) (source As IAsyncEnumerable(Of TSource), collectionSelector As Func(Of TSource, IAsyncEnumerable(Of TCollection)), resultSelector As Func(Of TSource, TCollection, TResult)) As IAsyncEnumerable(Of TResult)

類型參數

TSource

來源元素的類型。

TCollection

由 收集 collectionSelector的中間元素類型。

TResult

結果序列中元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的價值要投射。

collectionSelector
Func<TSource,IAsyncEnumerable<TCollection>>

一個轉換函數,應用於輸入序列中的每個元素。

resultSelector
Func<TSource,TCollection,TResult>

一個轉換函數,應用於中間序列的每個元素。

傳回

IAsyncEnumerable<TResult>

其 IAsyncEnumerable<T> 元素是對來源元素的每個元素調用一對多轉換函 collectionSelector 數,然後將這些序列元素及其對應的來源元素映射到結果元素的結果。

例外狀況

resultSelector 是 null。

適用於

SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<IEnumerable<TCollection>>>, Func<TSource,TCollection,CancellationToken,ValueTask<TResult>>)

來源:
SelectMany.cs
來源:
SelectMany.cs
來源:
SelectMany.cs

將序列中的每個元素投影為 IEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。 每個來源專案的索引會用於該專案的中繼投影形式。

public:
generic <typename TSource, typename TCollection, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ SelectMany(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<System::Collections::Generic::IEnumerable<TCollection> ^>> ^ collectionSelector, Func<TSource, TCollection, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<TResult>> ^ resultSelector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> SelectMany<TSource,TCollection,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<System.Collections.Generic.IEnumerable<TCollection>>> collectionSelector, Func<TSource,TCollection,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TResult>> resultSelector);
static member SelectMany : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<seq<'Collection>>> * Func<'Source, 'Collection, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Result>> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TCollection, TResult) (source As IAsyncEnumerable(Of TSource), collectionSelector As Func(Of TSource, CancellationToken, ValueTask(Of IEnumerable(Of TCollection))), resultSelector As Func(Of TSource, TCollection, CancellationToken, ValueTask(Of TResult))) As IAsyncEnumerable(Of TResult)

類型參數

TSource

來源元素的類型。

TCollection

由 收集 collectionSelector的中間元素類型。

TResult

結果序列中元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的價值要投射。

collectionSelector
Func<TSource,CancellationToken,ValueTask<IEnumerable<TCollection>>>

一個轉換函數,應用於輸入序列中的每個元素。

resultSelector
Func<TSource,TCollection,CancellationToken,ValueTask<TResult>>

一個轉換函數,應用於中間序列的每個元素。

傳回

IAsyncEnumerable<TResult>

其 IAsyncEnumerable<T> 元素是對來源元素的每個元素調用一對多轉換函 collectionSelector 數,然後將這些序列元素及其對應的來源元素映射到結果元素的結果。

例外狀況

resultSelector 是 null。

適用於

SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,CancellationToken,ValueTask<IEnumerable<TCollection>>>, Func<TSource,TCollection,CancellationToken,ValueTask<TResult>>)

來源:
SelectMany.cs
來源:
SelectMany.cs
來源:
SelectMany.cs

將序列中的每個元素投影為 IEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。

public:
generic <typename TSource, typename TCollection, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ SelectMany(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, int, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<System::Collections::Generic::IEnumerable<TCollection> ^>> ^ collectionSelector, Func<TSource, TCollection, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<TResult>> ^ resultSelector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> SelectMany<TSource,TCollection,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,int,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<System.Collections.Generic.IEnumerable<TCollection>>> collectionSelector, Func<TSource,TCollection,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TResult>> resultSelector);
static member SelectMany : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, int, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<seq<'Collection>>> * Func<'Source, 'Collection, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Result>> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TCollection, TResult) (source As IAsyncEnumerable(Of TSource), collectionSelector As Func(Of TSource, Integer, CancellationToken, ValueTask(Of IEnumerable(Of TCollection))), resultSelector As Func(Of TSource, TCollection, CancellationToken, ValueTask(Of TResult))) As IAsyncEnumerable(Of TResult)

類型參數

TSource

來源元素的類型。

TCollection

由 收集 collectionSelector的中間元素類型。

TResult

結果序列中元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的價值要投射。

collectionSelector
Func<TSource,Int32,CancellationToken,ValueTask<IEnumerable<TCollection>>>

一個轉換函數,應用於輸入序列中的每個元素。

resultSelector
Func<TSource,TCollection,CancellationToken,ValueTask<TResult>>

一個轉換函數,應用於中間序列的每個元素。

傳回

IAsyncEnumerable<TResult>

其 IAsyncEnumerable<T> 元素是對來源元素的每個元素調用一對多轉換函 collectionSelector 數,然後將這些序列元素及其對應的來源元素映射到結果元素的結果。

例外狀況

resultSelector 是 null。

適用於

SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

來源:
SelectMany.cs
來源:
SelectMany.cs
來源:
SelectMany.cs

將序列中的每個元素投影為 IEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。

public:
generic <typename TSource, typename TCollection, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ SelectMany(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, int, System::Collections::Generic::IEnumerable<TCollection> ^> ^ collectionSelector, Func<TSource, TCollection, TResult> ^ resultSelector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> SelectMany<TSource,TCollection,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,int,System.Collections.Generic.IEnumerable<TCollection>> collectionSelector, Func<TSource,TCollection,TResult> resultSelector);
static member SelectMany : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, int, seq<'Collection>> * Func<'Source, 'Collection, 'Result> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TCollection, TResult) (source As IAsyncEnumerable(Of TSource), collectionSelector As Func(Of TSource, Integer, IEnumerable(Of TCollection)), resultSelector As Func(Of TSource, TCollection, TResult)) As IAsyncEnumerable(Of TResult)

類型參數

TSource

來源元素的類型。

TCollection

由 收集 collectionSelector的中間元素類型。

TResult

結果序列中元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的價值要投射。

collectionSelector
Func<TSource,Int32,IEnumerable<TCollection>>

一個轉換函數,應用於輸入序列中的每個元素。

resultSelector
Func<TSource,TCollection,TResult>

一個轉換函數,應用於中間序列的每個元素。

傳回

IAsyncEnumerable<TResult>

其 IAsyncEnumerable<T> 元素是對來源元素的每個元素調用一對多轉換函 collectionSelector 數,然後將這些序列元素及其對應的來源元素映射到結果元素的結果。

例外狀況

resultSelector 是 null。

適用於

SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,IAsyncEnumerable<TCollection>>, Func<TSource, TCollection,CancellationToken,ValueTask<TResult>>)

來源:
SelectMany.cs
來源:
SelectMany.cs
來源:
SelectMany.cs

將序列中的每個元素投影為 IAsyncEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。

public:
generic <typename TSource, typename TCollection, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ SelectMany(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, int, System::Collections::Generic::IAsyncEnumerable<TCollection> ^> ^ collectionSelector, Func<TSource, TCollection, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<TResult>> ^ resultSelector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> SelectMany<TSource,TCollection,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,int,System.Collections.Generic.IAsyncEnumerable<TCollection>> collectionSelector, Func<TSource,TCollection,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TResult>> resultSelector);
static member SelectMany : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, int, System.Collections.Generic.IAsyncEnumerable<'Collection>> * Func<'Source, 'Collection, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Result>> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TCollection, TResult) (source As IAsyncEnumerable(Of TSource), collectionSelector As Func(Of TSource, Integer, IAsyncEnumerable(Of TCollection)), resultSelector As Func(Of TSource, TCollection, CancellationToken, ValueTask(Of TResult))) As IAsyncEnumerable(Of TResult)

類型參數

TSource

來源元素的類型。

TCollection

由 收集 collectionSelector的中間元素類型。

TResult

結果序列中元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的價值要投射。

collectionSelector
Func<TSource,Int32,IAsyncEnumerable<TCollection>>

一個轉換函數,應用於輸入序列中的每個元素。

resultSelector
Func<TSource,TCollection,CancellationToken,ValueTask<TResult>>

一個轉換函數,應用於中間序列的每個元素。

傳回

IAsyncEnumerable<TResult>

其 IAsyncEnumerable<T> 元素是對來源元素的每個元素調用一對多轉換函 collectionSelector 數,然後將這些序列元素及其對應的來源元素映射到結果元素的結果。

例外狀況

resultSelector 是 null。

適用於

SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

來源:
SelectMany.cs
來源:
SelectMany.cs
來源:
SelectMany.cs

將序列中的每個元素投影為 IEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。 每個來源專案的索引會用於該專案的中繼投影形式。

public:
generic <typename TSource, typename TCollection, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ SelectMany(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, System::Collections::Generic::IEnumerable<TCollection> ^> ^ collectionSelector, Func<TSource, TCollection, TResult> ^ resultSelector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> SelectMany<TSource,TCollection,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,System.Collections.Generic.IEnumerable<TCollection>> collectionSelector, Func<TSource,TCollection,TResult> resultSelector);
static member SelectMany : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, seq<'Collection>> * Func<'Source, 'Collection, 'Result> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TCollection, TResult) (source As IAsyncEnumerable(Of TSource), collectionSelector As Func(Of TSource, IEnumerable(Of TCollection)), resultSelector As Func(Of TSource, TCollection, TResult)) As IAsyncEnumerable(Of TResult)

類型參數

TSource

來源元素的類型。

TCollection

由 收集 collectionSelector的中間元素類型。

TResult

結果序列中元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的價值要投射。

collectionSelector
Func<TSource,IEnumerable<TCollection>>

一個轉換函數,應用於輸入序列中的每個元素。

resultSelector
Func<TSource,TCollection,TResult>

一個轉換函數,應用於中間序列的每個元素。

傳回

IAsyncEnumerable<TResult>

其 IAsyncEnumerable<T> 元素是對來源元素的每個元素調用一對多轉換函 collectionSelector 數,然後將這些序列元素及其對應的來源元素映射到結果元素的結果。

例外狀況

resultSelector 是 null。

適用於

SelectMany<TSource,TCollection,TResult>(IAsyncEnumerable<TSource>, Func<TSource,IAsyncEnumerable<TCollection>>, Func<TSource,TCollection, CancellationToken,ValueTask<TResult>>)

來源:
SelectMany.cs
來源:
SelectMany.cs
來源:
SelectMany.cs

將序列中的每個元素投影為 IAsyncEnumerable<T>,將所得序列展平成一個 IAsyncEnumerable<T> 序列,並對每個元素呼叫結果選擇函式。 每個來源專案的索引會用於該專案的中繼投影形式。

public:
generic <typename TSource, typename TCollection, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ SelectMany(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, System::Collections::Generic::IAsyncEnumerable<TCollection> ^> ^ collectionSelector, Func<TSource, TCollection, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<TResult>> ^ resultSelector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> SelectMany<TSource,TCollection,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,System.Collections.Generic.IAsyncEnumerable<TCollection>> collectionSelector, Func<TSource,TCollection,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TResult>> resultSelector);
static member SelectMany : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, System.Collections.Generic.IAsyncEnumerable<'Collection>> * Func<'Source, 'Collection, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Result>> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TCollection, TResult) (source As IAsyncEnumerable(Of TSource), collectionSelector As Func(Of TSource, IAsyncEnumerable(Of TCollection)), resultSelector As Func(Of TSource, TCollection, CancellationToken, ValueTask(Of TResult))) As IAsyncEnumerable(Of TResult)

類型參數

TSource

來源元素的類型。

TCollection

由 收集 collectionSelector的中間元素類型。

TResult

結果序列中元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的價值要投射。

collectionSelector
Func<TSource,IAsyncEnumerable<TCollection>>

一個轉換函數,應用於輸入序列中的每個元素。

resultSelector
Func<TSource,TCollection,CancellationToken,ValueTask<TResult>>

一個轉換函數,應用於中間序列的每個元素。

傳回

IAsyncEnumerable<TResult>

其 IAsyncEnumerable<T> 元素是對來源元素的每個元素調用一對多轉換函 collectionSelector 數,然後將這些序列元素及其對應的來源元素映射到結果元素的結果。

例外狀況

resultSelector 是 null。

適用於

SelectMany<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TResult>>)

來源:
SelectMany.cs
來源:
SelectMany.cs
來源:
SelectMany.cs

將序列中的每個元素投影為 , IEnumerable<T> 並將所得序列平展成一個 IAsyncEnumerable<T> 序列。 每個來源專案的索引會以該專案的投影形式使用。

public:
generic <typename TSource, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ SelectMany(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, int, System::Collections::Generic::IEnumerable<TResult> ^> ^ selector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> SelectMany<TSource,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,int,System.Collections.Generic.IEnumerable<TResult>> selector);
static member SelectMany : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, int, seq<'Result>> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TResult) (source As IAsyncEnumerable(Of TSource), selector As Func(Of TSource, Integer, IEnumerable(Of TResult))) As IAsyncEnumerable(Of TResult)

類型參數

TSource

來源元素的類型。

TResult

選擇器回傳序列元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的價值要投射。

selector
Func<TSource,Int32,IEnumerable<TResult>>

一個轉換函數,可以套用到每個元素。

傳回

IAsyncEnumerable<TResult>

其 IAsyncEnumerable<T> 元素是對輸入序列中每個元素調用一對多轉換函數所產生的結果。

例外狀況

selector 是 null。

適用於

SelectMany<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,CancellationToken,ValueTask<IEnumerable<TResult>>>)

來源:
SelectMany.cs
來源:
SelectMany.cs
來源:
SelectMany.cs

將序列中的每個元素投影為 , IEnumerable<T> 並將所得序列平展成一個 IAsyncEnumerable<T> 序列。 每個來源專案的索引會以該專案的投影形式使用。

public:
generic <typename TSource, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ SelectMany(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, int, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<System::Collections::Generic::IEnumerable<TResult> ^>> ^ selector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> SelectMany<TSource,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,int,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<System.Collections.Generic.IEnumerable<TResult>>> selector);
static member SelectMany : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, int, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<seq<'Result>>> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TResult) (source As IAsyncEnumerable(Of TSource), selector As Func(Of TSource, Integer, CancellationToken, ValueTask(Of IEnumerable(Of TResult)))) As IAsyncEnumerable(Of TResult)

類型參數

TSource

來源元素的類型。

TResult

選擇器回傳序列元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的價值要投射。

selector
Func<TSource,Int32,CancellationToken,ValueTask<IEnumerable<TResult>>>

一個轉換函數,可以套用到每個元素。

傳回

IAsyncEnumerable<TResult>

其 IAsyncEnumerable<T> 元素是對輸入序列中每個元素調用一對多轉換函數所產生的結果。

例外狀況

selector 是 null。

適用於

SelectMany<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<IEnumerable<TResult>>>)

來源:
SelectMany.cs
來源:
SelectMany.cs
來源:
SelectMany.cs

將序列中的每個元素投影為 , IEnumerable<T> 並將所得序列平展成一個 IAsyncEnumerable<T> 序列。

public:
generic <typename TSource, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ SelectMany(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<System::Collections::Generic::IEnumerable<TResult> ^>> ^ selector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> SelectMany<TSource,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<System.Collections.Generic.IEnumerable<TResult>>> selector);
static member SelectMany : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<seq<'Result>>> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TResult) (source As IAsyncEnumerable(Of TSource), selector As Func(Of TSource, CancellationToken, ValueTask(Of IEnumerable(Of TResult)))) As IAsyncEnumerable(Of TResult)

類型參數

TSource

來源元素的類型。

TResult

選擇器回傳序列元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的價值要投射。

selector
Func<TSource,CancellationToken,ValueTask<IEnumerable<TResult>>>

一個轉換函數,可以套用到每個元素。

傳回

IAsyncEnumerable<TResult>

其 IAsyncEnumerable<T> 元素是對輸入序列中每個元素調用一對多轉換函數所產生的結果。

例外狀況

selector 是 null。

適用於

SelectMany<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,IAsyncEnumerable<TResult>>)

來源:
SelectMany.cs
來源:
SelectMany.cs
來源:
SelectMany.cs

將序列中的每個元素投影為 , IAsyncEnumerable<T> 並將所得序列平展成一個 IAsyncEnumerable<T> 序列。 每個來源專案的索引會以該專案的投影形式使用。

public:
generic <typename TSource, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ SelectMany(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, int, System::Collections::Generic::IAsyncEnumerable<TResult> ^> ^ selector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> SelectMany<TSource,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,int,System.Collections.Generic.IAsyncEnumerable<TResult>> selector);
static member SelectMany : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, int, System.Collections.Generic.IAsyncEnumerable<'Result>> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TResult) (source As IAsyncEnumerable(Of TSource), selector As Func(Of TSource, Integer, IAsyncEnumerable(Of TResult))) As IAsyncEnumerable(Of TResult)

類型參數

TSource

來源元素的類型。

TResult

選擇器回傳序列元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的價值要投射。

selector
Func<TSource,Int32,IAsyncEnumerable<TResult>>

一個轉換函數,可以套用到每個元素。

傳回

IAsyncEnumerable<TResult>

其 IAsyncEnumerable<T> 元素是對輸入序列中每個元素調用一對多轉換函數所產生的結果。

例外狀況

selector 是 null。

適用於

SelectMany<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,IEnumerable<TResult>>)

來源:
SelectMany.cs
來源:
SelectMany.cs
來源:
SelectMany.cs

將序列中的每個元素投影為 , IEnumerable<T> 並將所得序列平展成一個 IAsyncEnumerable<T> 序列。

public:
generic <typename TSource, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ SelectMany(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, System::Collections::Generic::IEnumerable<TResult> ^> ^ selector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> SelectMany<TSource,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,System.Collections.Generic.IEnumerable<TResult>> selector);
static member SelectMany : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, seq<'Result>> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TResult) (source As IAsyncEnumerable(Of TSource), selector As Func(Of TSource, IEnumerable(Of TResult))) As IAsyncEnumerable(Of TResult)

類型參數

TSource

來源元素的類型。

TResult

選擇器回傳序列元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的價值要投射。

selector
Func<TSource,IEnumerable<TResult>>

一個轉換函數,可以套用到每個元素。

傳回

IAsyncEnumerable<TResult>

其 IAsyncEnumerable<T> 元素是對輸入序列中每個元素調用一對多轉換函數所產生的結果。

例外狀況

selector 是 null。

適用於

SelectMany<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,IAsyncEnumerable<TResult>>)

來源:
SelectMany.cs
來源:
SelectMany.cs
來源:
SelectMany.cs

將序列中的每個元素投影為 , IAsyncEnumerable<T> 並將所得序列平展成一個 IAsyncEnumerable<T> 序列。

public:
generic <typename TSource, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ SelectMany(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, System::Collections::Generic::IAsyncEnumerable<TResult> ^> ^ selector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> SelectMany<TSource,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,System.Collections.Generic.IAsyncEnumerable<TResult>> selector);
static member SelectMany : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, System.Collections.Generic.IAsyncEnumerable<'Result>> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function SelectMany(Of TSource, TResult) (source As IAsyncEnumerable(Of TSource), selector As Func(Of TSource, IAsyncEnumerable(Of TResult))) As IAsyncEnumerable(Of TResult)

類型參數

TSource

來源元素的類型。

TResult

選擇器回傳序列元素的類型。

參數

source
IAsyncEnumerable<TSource>

一連串的價值要投射。

selector
Func<TSource,IAsyncEnumerable<TResult>>

一個轉換函數,可以套用到每個元素。

傳回

IAsyncEnumerable<TResult>

其 IAsyncEnumerable<T> 元素是對輸入序列中每個元素調用一對多轉換函數所產生的結果。

例外狀況

selector 是 null。

適用於