Table of Contents

Class PairwiseOperator

Namespace
RxSharp.Operators
Assembly
RxSharp.dll

Extension methods implementing the pairwise operator.

public static class PairwiseOperator
Inheritance
System.Object
PairwiseOperator

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

source Observable<T>

The source sequence.

Returns

Observable<(T Previous, T Current)>

An observable of (Previous, Current) tuples, one per source emission after the first. If source emits at most one value before completing, the output completes without ever emitting.

Type Parameters

T

The type of values emitted by source.