Qbservable.Zip<TFirst, TSecond, TResult> Method (IQbservable<TFirst>, IObservable<TSecond>, Expression<Func<TFirst, TSecond, TResult>>)
Merges two queryable observable sequences into one queryable observable sequence by combining their elements in a pairwise fashion.
Namespace: System.Reactive.Linq
Assembly: System.Reactive.Providers (in System.Reactive.Providers.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function Zip(Of TFirst, TSecond, TResult) ( _
first As IQbservable(Of TFirst), _
second As IObservable(Of TSecond), _
resultSelector As Expression(Of Func(Of TFirst, TSecond, TResult)) _
) As IQbservable(Of TResult)
'Usage
Dim first As IQbservable(Of TFirst)
Dim second As IObservable(Of TSecond)
Dim resultSelector As Expression(Of Func(Of TFirst, TSecond, TResult))
Dim returnValue As IQbservable(Of TResult)
returnValue = first.Zip(second, resultSelector)
public static IQbservable<TResult> Zip<TFirst, TSecond, TResult>(
this IQbservable<TFirst> first,
IObservable<TSecond> second,
Expression<Func<TFirst, TSecond, TResult>> resultSelector
)
[ExtensionAttribute]
public:
generic<typename TFirst, typename TSecond, typename TResult>
static IQbservable<TResult>^ Zip(
IQbservable<TFirst>^ first,
IObservable<TSecond>^ second,
Expression<Func<TFirst, TSecond, TResult>^>^ resultSelector
)
static member Zip :
first:IQbservable<'TFirst> *
second:IObservable<'TSecond> *
resultSelector:Expression<Func<'TFirst, 'TSecond, 'TResult>> -> IQbservable<'TResult>
JScript does not support generic types and methods.
Type Parameters
- TFirst
The first type.
- TSecond
The second type.
- TResult
The type of result.
Parameters
- first
Type: System.Reactive.Linq.IQbservable<TFirst>
The first observable source.
- second
Type: System.IObservable<TSecond>
The second observable source.
- resultSelector
Type: System.Linq.Expressions.Expression<Func<TFirst, TSecond, TResult>>
The function to invoke for each consecutive pair of elements from the first and second source.
Return Value
Type: System.Reactive.Linq.IQbservable<TResult>
A queryable observable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IQbservable<TFirst>. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .