Method Zip
- Namespace
- Bonsai
- Assembly
- Bonsai.Core.dll
Zip<TSource1, TSource2, TResult>(IObservable<TSource1>, IEnumerable<TSource2>, Func<TSource1, TSource2, TResult>)
Merges an observable sequence and an enumerable sequence into one observable sequence by using the selector function.
public static IObservable<TResult> Zip<TSource1, TSource2, TResult>(this IObservable<TSource1> first, IEnumerable<TSource2> second, Func<TSource1, TSource2, TResult> resultSelector)
Parameters
first
IObservable<TSource1>The first observable source.
second
IEnumerable<TSource2>The second enumerable source.
resultSelector
Func<TSource1, TSource2, TResult>The function to invoke for each consecutive pair of elements from the first and second source.
Returns
- IObservable<TResult>
An observable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function.
Type Parameters
TSource1
The type of the elements in the first observable source sequence.
TSource2
The type of the elements in the second observable source sequence.
TResult
The type of the elements in the result sequence, returned by the selector function.