Class DistinctUntilChanged
Represents an operator that returns only distinct contiguous elements of an observable sequence.
The DistinctUntilChanged
operator removes all contiguous elements in the sequence that are equal. Equality is determined by the default EqualityComparer<T> for the type of the elements in the source sequence.
In other words, after each element is emitted by the result sequence, subsequent elements will be dropped until the value changes.
public class DistinctUntilChanged : Combinator
- Inheritance
-
DistinctUntilChanged
- Inherited Members
Methods
Process<TSource>(IObservable<TSource>)
Returns an observable sequence that contains only distinct contiguous elements.
public override IObservable<TSource> Process<TSource>(IObservable<TSource> source)
Parameters
source
IObservable<TSource>An observable sequence to retain distinct contiguous elements for.
Returns
- IObservable<TSource>
An observable sequence only containing the distinct contiguous elements from the source sequence.
Type Parameters
TSource
The type of the elements in the
source
sequence.