,System.IObservable{--1},System.Linq.Expressions.Expression})}
Qbservable.WithLatestFrom(IQbservable, IObservable, Expression>) method¶
Defined in
Type: Qbservable
Namespace: System.Reactive.Linq
Assembly: System.Reactive.dll
Applies to
netstandard2.0
public static IQbservable<TResult> WithLatestFrom<TFirst, TSecond, TResult>(this IQbservable<TFirst> first, IObservable<TSecond> second, Expression<Func<TFirst, TSecond, TResult>> resultSelector)
Summary:
Merges two observable sequences into one observable sequence by combining each element from the first source with the latest element from the second source, if any.
Starting from Rx.NET 4.0, this will subscribe to second before subscribing to first to have a latest element readily available
in case first emits an element right away.
Type parameters
| Name | Description |
|---|---|
TFirst | The type of the elements in the first source sequence. |
TSecond | The type of the elements in the second source sequence. |
TResult | The type of the elements in the result sequence, returned by the selector function. |
Parameters
| Name | Type | Description |
|---|---|---|
first | [IQbservable | First observable source. |
second | IObservable | Second observable source. |
resultSelector | Expression | Function to invoke for each element from the first source combined with the latest element from the second source, if any. |
Returns: IQbservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | first or second or resultSelector is null. |