Table of Contents

Class TakeWhile

Namespace
Bonsai.Reactive
Assembly
Bonsai.Core.dll

Represents an expression builder which returns elements from an observable sequence as long as the condition specified by the encapsulated workflow is true.

Marble diagram

The nested workflow specifying the condition must return a sequence of type bool. This nested sequence may be synchronous or asynchronous with respect to notifications from the source sequence.

After each element is emitted by the source sequence, the latest value from the nested sequence is checked. While the value is true, TakeWhile will continue to emit all elements from the source sequence. When the value changes to false, TakeWhile will terminate successfully.

[WorkflowElementCategory(ElementCategory.Combinator)]
public class TakeWhile : Condition, IWorkflowExpressionBuilder, INamedElement, IPropertyMappingBuilder, IExpressionBuilder
Inheritance
TakeWhile
Implements
Inherited Members
Extension Methods

Constructors

TakeWhile()

Initializes a new instance of the TakeWhile class.

public TakeWhile()

TakeWhile(ExpressionBuilderGraph)

Initializes a new instance of the TakeWhile class with the specified expression builder workflow.

public TakeWhile(ExpressionBuilderGraph workflow)

Parameters

workflow ExpressionBuilderGraph

The expression builder workflow instance that will be used by this builder to generate the output expression tree.