Class PairwiseOperator
Extension methods implementing the pairwise operator.
public static class PairwiseOperator
- Inheritance
-
System.ObjectPairwiseOperator
Methods
Pairwise<T>(Observable<T>)
Emits a tuple of each value emitted by source together with the value that preceded
it. The very first value has no predecessor, so it is buffered but not emitted on its own; the first
emitted tuple pairs the first and second source values.
public static Observable<(T Previous, T Current)> Pairwise<T>(this Observable<T> source)
Parameters
sourceObservable<T>The source sequence.
Returns
- Observable<(T Previous, T Current)>
An observable of
(Previous, Current)tuples, one per source emission after the first. Ifsourceemits at most one value before completing, the output completes without ever emitting.
Type Parameters
TThe type of values emitted by
source.