Table of Contents

Class SelectMany

Namespace
Bonsai.Reactive
Assembly
Bonsai.Core.dll

Represents an expression builder that merges higher-order observable sequences generated from the encapsulated workflow.

Marble diagram

For each notification in the source sequence, SelectMany constructs and subscribes to the results of an asynchronous operation specified in the nested workflow. If multiple asynchronous operations are launched simultaneously, SelectMany will merge all the results into a single sequence.

The input to the nested workflow represents the element passed as an argument to the asynchronous operation. If the input is itself an observable sequence, the WorkflowInput node will subscribe to all the values in the sequence when the asynchronous operation is launched. Otherwise, the input will emit a single value containing the stored argument value.

Tip

SelectMany is one of the most versatile reactive operators and can be used as a primitive building block on which to build a large number of more complex reactive operators, including reactive state machines. See the State Machines tutorial for examples.

public class SelectMany : SingleArgumentWorkflowExpressionBuilder, IWorkflowExpressionBuilder, INamedElement, IPropertyMappingBuilder, IExpressionBuilder
Inheritance
SelectMany
Implements
Inherited Members
Extension Methods

Constructors

SelectMany()

Initializes a new instance of the SelectMany class.

SelectMany(ExpressionBuilderGraph)

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

Methods

Build(IEnumerable<Expression>)

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