AsyncEnumerable.Zip 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| 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>) |
生成包含三个指定序列中的元素的元组序列。 |
| Zip<TFirst,TSecond>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>) |
生成包含两个指定序列中的元素的元组序列。 |
Zip<TFirst,TSecond,TResult>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, Func<TFirst,TSecond,CancellationToken,ValueTask<TResult>>)
- Source:
- Zip.cs
- Source:
- Zip.cs
- Source:
- 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<T> 包含两个输入序列的合并元素。
例外
resultSelector 是 null。
适用于
Zip<TFirst,TSecond,TResult>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, Func<TFirst,TSecond,TResult>)
- Source:
- Zip.cs
- Source:
- Zip.cs
- Source:
- 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<T> 包含两个输入序列的合并元素。
例外
resultSelector 是 null。
适用于
Zip<TFirst,TSecond,TThird>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, IAsyncEnumerable<TThird>)
- Source:
- Zip.cs
- Source:
- Zip.cs
- Source:
- Zip.cs
生成包含三个指定序列中的元素的元组序列。
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>
要合并的第三个序列。
返回
一系列元组,其元素按顺序从第一个、第二个和第三个序列中获取。
例外
third 是 null。
适用于
Zip<TFirst,TSecond>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>)
- Source:
- Zip.cs
- Source:
- Zip.cs
- Source:
- Zip.cs
生成包含两个指定序列中的元素的元组序列。
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>
要合并的第二个序列。
返回
一系列元组,其中包含从第一个和第二个序列中获取的元素,顺序为该顺序。
例外
second 是 null。