Class SelectMany
Represents an expression builder that merges higher-order observable sequences generated from the encapsulated workflow.
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.
public SelectMany()
SelectMany(ExpressionBuilderGraph)
Initializes a new instance of the SelectMany class with the specified expression builder workflow.
public SelectMany(ExpressionBuilderGraph workflow)
Parameters
workflow
ExpressionBuilderGraphThe expression builder workflow instance that will be used by this builder to generate the output expression tree.
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.
public override Expression Build(IEnumerable<Expression> arguments)
Parameters
arguments
IEnumerable<Expression>A collection of Expression nodes that represents the input arguments.
Returns
- Expression
An Expression tree node.