Table of Contents

Class Distinct

Namespace
Bonsai.Reactive
Assembly
Bonsai.Core.dll

Represents an operator that returns an observable sequence containing only distinct elements.

Marble diagram

The Distinct operator ensures that only unique elements are included in the result sequence. Uniqueness is specified by the default EqualityComparer<T> for the type of the elements in the source sequence. If multiple non-unique elements are present in the source sequence, only the first element will be included in the result sequence.

public class Distinct : Combinator
Inheritance
Distinct
Inherited Members

Methods

Process<TSource>(IObservable<TSource>)

Returns an observable sequence containing only distinct elements.

public override IObservable<TSource> Process<TSource>(IObservable<TSource> source)

Parameters

source IObservable<TSource>

An observable sequence to retain distinct elements for.

Returns

IObservable<TSource>

An observable sequence containing only the distinct elements from the source sequence.

Type Parameters

TSource

The type of the elements in the source sequence.