語言

AsyncEnumerable.Zip 方法

定義

多載

名稱 Description
Zip<TFirst,TSecond,TResult>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, Func<TFirst,TSecond,CancellationToken,ValueTask<TResult>>)

將指定的函式套用至兩個序列的對應專案,產生結果序列。

Zip<TFirst,TSecond,TResult>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, Func<TFirst,TSecond,TResult>)

將指定的函式套用至兩個序列的對應專案,產生結果序列。

Zip<TFirst,TSecond,TThird>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, IAsyncEnumerable<TThird>)

產生具有來自三個指定序列之元素的 Tuple 序列。

Zip<TFirst,TSecond>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>)

產生具有來自兩個指定序列之元素的 Tuple 序列。

Zip<TFirst,TSecond,TResult>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, Func<TFirst,TSecond,CancellationToken,ValueTask<TResult>>)

來源:
Zip.cs
來源:
Zip.cs
來源:
Zip.cs
來源:
Zip.cs

將指定的函式套用至兩個序列的對應專案,產生結果序列。

public:
generic <typename TFirst, typename TSecond, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ Zip(System::Collections::Generic::IAsyncEnumerable<TFirst> ^ first, System::Collections::Generic::IAsyncEnumerable<TSecond> ^ second, Func<TFirst, TSecond, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<TResult>> ^ resultSelector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> Zip<TFirst,TSecond,TResult>(this System.Collections.Generic.IAsyncEnumerable<TFirst> first, System.Collections.Generic.IAsyncEnumerable<TSecond> second, Func<TFirst,TSecond,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TResult>> resultSelector);
static member Zip : System.Collections.Generic.IAsyncEnumerable<'First> * System.Collections.Generic.IAsyncEnumerable<'Second> * Func<'First, 'Second, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Result>> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function Zip(Of TFirst, TSecond, TResult) (first As IAsyncEnumerable(Of TFirst), second As IAsyncEnumerable(Of TSecond), resultSelector As Func(Of TFirst, TSecond, CancellationToken, ValueTask(Of TResult))) As IAsyncEnumerable(Of TResult)

類型參數

TFirst

第一個輸入序列元素的型別。

TSecond

第二個輸入序列元素的類型。

TResult

結果序列元素的類型。

參數

first
IAsyncEnumerable<TFirst>

第一個合併的序列。

second
IAsyncEnumerable<TSecond>

第二個合併序列。

resultSelector
Func<TFirst,TSecond,CancellationToken,ValueTask<TResult>>

一個指定如何合併兩個序列元素的函數。

傳回

IAsyncEnumerable<TResult>

一個 IAsyncEnumerable<T> 包含兩個輸入序列合併元素的 。

例外狀況

resultSelector 是 null。

適用於

Zip<TFirst,TSecond,TResult>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, Func<TFirst,TSecond,TResult>)

來源:
Zip.cs
來源:
Zip.cs
來源:
Zip.cs
來源:
Zip.cs

將指定的函式套用至兩個序列的對應專案,產生結果序列。

public:
generic <typename TFirst, typename TSecond, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TResult> ^ Zip(System::Collections::Generic::IAsyncEnumerable<TFirst> ^ first, System::Collections::Generic::IAsyncEnumerable<TSecond> ^ second, Func<TFirst, TSecond, TResult> ^ resultSelector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> Zip<TFirst,TSecond,TResult>(this System.Collections.Generic.IAsyncEnumerable<TFirst> first, System.Collections.Generic.IAsyncEnumerable<TSecond> second, Func<TFirst,TSecond,TResult> resultSelector);
static member Zip : System.Collections.Generic.IAsyncEnumerable<'First> * System.Collections.Generic.IAsyncEnumerable<'Second> * Func<'First, 'Second, 'Result> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function Zip(Of TFirst, TSecond, TResult) (first As IAsyncEnumerable(Of TFirst), second As IAsyncEnumerable(Of TSecond), resultSelector As Func(Of TFirst, TSecond, TResult)) As IAsyncEnumerable(Of TResult)

類型參數

TFirst

第一個輸入序列元素的型別。

TSecond

第二個輸入序列元素的類型。

TResult

結果序列元素的類型。

參數

first
IAsyncEnumerable<TFirst>

第一個合併的序列。

second
IAsyncEnumerable<TSecond>

第二個合併序列。

resultSelector
Func<TFirst,TSecond,TResult>

一個指定如何合併兩個序列元素的函數。

傳回

IAsyncEnumerable<TResult>

一個 IAsyncEnumerable<T> 包含兩個輸入序列合併元素的 。

例外狀況

resultSelector 是 null。

適用於

Zip<TFirst,TSecond,TThird>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, IAsyncEnumerable<TThird>)

來源:
Zip.cs
來源:
Zip.cs
來源:
Zip.cs
來源:
Zip.cs

產生具有來自三個指定序列之元素的 Tuple 序列。

public:
generic <typename TFirst, typename TSecond, typename TThird>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<ValueTuple<TFirst, TSecond, TThird>> ^ Zip(System::Collections::Generic::IAsyncEnumerable<TFirst> ^ first, System::Collections::Generic::IAsyncEnumerable<TSecond> ^ second, System::Collections::Generic::IAsyncEnumerable<TThird> ^ third);
public static System.Collections.Generic.IAsyncEnumerable<(TFirst First, TSecond Second, TThird Third)> Zip<TFirst,TSecond,TThird>(this System.Collections.Generic.IAsyncEnumerable<TFirst> first, System.Collections.Generic.IAsyncEnumerable<TSecond> second, System.Collections.Generic.IAsyncEnumerable<TThird> third);
static member Zip : System.Collections.Generic.IAsyncEnumerable<'First> * System.Collections.Generic.IAsyncEnumerable<'Second> * System.Collections.Generic.IAsyncEnumerable<'hird> -> System.Collections.Generic.IAsyncEnumerable<ValueTuple<'First, 'Second, 'hird>>
<Extension()>
Public Function Zip(Of TFirst, TSecond, TThird) (first As IAsyncEnumerable(Of TFirst), second As IAsyncEnumerable(Of TSecond), third As IAsyncEnumerable(Of TThird)) As IAsyncEnumerable(Of ValueTuple(Of TFirst, TSecond, TThird))

類型參數

TFirst

第一個輸入序列元素的型別。

TSecond

第二個輸入序列元素的類型。

TThird

第三個輸入序列元素的類型。

參數

first
IAsyncEnumerable<TFirst>

第一個合併的序列。

second
IAsyncEnumerable<TSecond>

第二個合併序列。

third
IAsyncEnumerable<TThird>

第三個合併序列。

傳回

IAsyncEnumerable<ValueTuple<TFirst,TSecond,TThird>>

一串元組,元素依序取自第一、第二和第三序列。

例外狀況

third 是 null。

適用於

Zip<TFirst,TSecond>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>)

來源:
Zip.cs
來源:
Zip.cs
來源:
Zip.cs
來源:
Zip.cs

產生具有來自兩個指定序列之元素的 Tuple 序列。

public:
generic <typename TFirst, typename TSecond>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<ValueTuple<TFirst, TSecond>> ^ Zip(System::Collections::Generic::IAsyncEnumerable<TFirst> ^ first, System::Collections::Generic::IAsyncEnumerable<TSecond> ^ second);
public static System.Collections.Generic.IAsyncEnumerable<(TFirst First, TSecond Second)> Zip<TFirst,TSecond>(this System.Collections.Generic.IAsyncEnumerable<TFirst> first, System.Collections.Generic.IAsyncEnumerable<TSecond> second);
static member Zip : System.Collections.Generic.IAsyncEnumerable<'First> * System.Collections.Generic.IAsyncEnumerable<'Second> -> System.Collections.Generic.IAsyncEnumerable<ValueTuple<'First, 'Second>>
<Extension()>
Public Function Zip(Of TFirst, TSecond) (first As IAsyncEnumerable(Of TFirst), second As IAsyncEnumerable(Of TSecond)) As IAsyncEnumerable(Of ValueTuple(Of TFirst, TSecond))

類型參數

TFirst

第一個輸入序列元素的型別。

TSecond

第二個輸入序列元素的類型。

參數

first
IAsyncEnumerable<TFirst>

第一個合併的序列。

second
IAsyncEnumerable<TSecond>

第二個合併序列。

傳回

IAsyncEnumerable<ValueTuple<TFirst,TSecond>>

一串元組,元素取自第一和第二序列,依序排列。

例外狀況

second 是 null。

適用於