Table of Contents

Class DistinctUntilChangedBy

Namespace
Bonsai.Reactive
Assembly
Bonsai.Core.dll

Represents an operator that returns only distinct contiguous elements according to the specified key.

Marble diagram

The DistinctUntilChangedBy operator removes all contiguous elements in the sequence with equal keys. The KeySelector property specifies the member, or set of members, used to test whether elements in the source sequence are equal. Equality is determined by the default EqualityComparer<T> for the type of the selected key.

In other words, after each element is emitted by the result sequence, subsequent elements will be dropped until the value of the key changes.

public class DistinctUntilChangedBy : SingleArgumentExpressionBuilder, IExpressionBuilder
Inheritance
DistinctUntilChangedBy
Implements
Inherited Members
Extension Methods

Properties

KeySelector

Gets or sets a value specifying the inner properties used to test the contiguity of each element in the sequence.

public string KeySelector { get; set; }

Property Value

string

Methods

Build(IEnumerable<Expression>)

Constructs an Expression node from a collection of input arguments. The result can be chained with other builders in a workflow.

public override Expression Build(IEnumerable<Expression> arguments)

Parameters

arguments IEnumerable<Expression>

A collection of Expression nodes representing the input arguments.

Returns

Expression

The constructed Expression node.