Table of Contents

Class WithLatestFrom

Namespace
Bonsai.Reactive
Assembly
Bonsai.Core.dll

Represents an operator that combines the latest values from the source sequences only when the first sequence produces an element.

Marble diagram

The behavior of WithLatestFrom is very similar to CombineLatest, but while CombineLatest emits a combined value whenever any of the source sequences emits a value, WithLatestFrom only emits the combination when the first sequence emits a value (as long as the second sequence has emitted at least one value).

[Combinator]
public class WithLatestFrom
Inheritance
WithLatestFrom
Inherited Members

Methods

Process<TSource, TOther>(IObservable<TSource>, IObservable<TOther>)

Merges the specified sources into one observable sequence by emitting a pair with the latest source elements only when the first observable sequence produces an element.

public IObservable<Tuple<TSource, TOther>> Process<TSource, TOther>(IObservable<TSource> source, IObservable<TOther> other)

Parameters

source IObservable<TSource>

The first observable sequence.

other IObservable<TOther>

The other observable sequence.

Returns

IObservable<Tuple<TSource, TOther>>

An observable sequence containing the result of combining the latest elements of the sources into pairs only when the first sequence produces an element.

Type Parameters

TSource

The type of the elements in the source sequence.

TOther

The type of the elements in the other sequence.