AsyncEnumerable.Zip 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.
Overloads
Zip<TFirst,TSecond,TResult>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, Func<TFirst,TSecond,CancellationToken,ValueTask<TResult>>) |
Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results. |
Zip<TFirst,TSecond,TResult>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, Func<TFirst,TSecond,TResult>) |
Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results. |
Zip<TFirst,TSecond,TThird>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, IAsyncEnumerable<TThird>) |
Produces a sequence of tuples with elements from the three specified sequences. |
Zip<TFirst,TSecond>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>) |
Produces a sequence of tuples with elements from the two specified sequences. |
Zip<TFirst,TSecond,TResult>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, Func<TFirst,TSecond,CancellationToken,ValueTask<TResult>>)
- Source:
- Zip.cs
Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results.
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)
Type Parameters
- TFirst
The type of the elements of the first input sequence.
- TSecond
The type of the elements of the second input sequence.
- TResult
The type of the elements of the result sequence.
Parameters
- first
- IAsyncEnumerable<TFirst>
The first sequence to merge.
- second
- IAsyncEnumerable<TSecond>
The second sequence to merge.
- resultSelector
- Func<TFirst,TSecond,CancellationToken,ValueTask<TResult>>
A function that specifies how to merge the elements from the two sequences.
Returns
An IAsyncEnumerable<T> that contains merged elements of two input sequences.
Exceptions
resultSelector
is null
.
Applies to
Zip<TFirst,TSecond,TResult>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, Func<TFirst,TSecond,TResult>)
- Source:
- Zip.cs
Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results.
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)
Type Parameters
- TFirst
The type of the elements of the first input sequence.
- TSecond
The type of the elements of the second input sequence.
- TResult
The type of the elements of the result sequence.
Parameters
- first
- IAsyncEnumerable<TFirst>
The first sequence to merge.
- second
- IAsyncEnumerable<TSecond>
The second sequence to merge.
- resultSelector
- Func<TFirst,TSecond,TResult>
A function that specifies how to merge the elements from the two sequences.
Returns
An IAsyncEnumerable<T> that contains merged elements of two input sequences.
Exceptions
resultSelector
is null
.
Applies to
Zip<TFirst,TSecond,TThird>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, IAsyncEnumerable<TThird>)
- Source:
- Zip.cs
Produces a sequence of tuples with elements from the three specified sequences.
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))
Type Parameters
- TFirst
The type of the elements of the first input sequence.
- TSecond
The type of the elements of the second input sequence.
- TThird
The type of the elements of the third input sequence.
Parameters
- first
- IAsyncEnumerable<TFirst>
The first sequence to merge.
- second
- IAsyncEnumerable<TSecond>
The second sequence to merge.
- third
- IAsyncEnumerable<TThird>
The third sequence to merge.
Returns
A sequence of tuples with elements taken from the first, second, and third sequences, in that order.
Exceptions
third
is null
.
Applies to
Zip<TFirst,TSecond>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>)
- Source:
- Zip.cs
Produces a sequence of tuples with elements from the two specified sequences.
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))
Type Parameters
- TFirst
The type of the elements of the first input sequence.
- TSecond
The type of the elements of the second input sequence.
Parameters
- first
- IAsyncEnumerable<TFirst>
The first sequence to merge.
- second
- IAsyncEnumerable<TSecond>
The second sequence to merge.
Returns
A sequence of tuples with elements taken from the first and second sequences, in that order.
Exceptions
second
is null
.