Table of Contents

Class SubscribeSubject

Namespace
Bonsai.Expressions
Assembly
Bonsai.Core.dll

Represents an expression builder that generates a sequence of values by subscribing to a shared subject.

The SubscribeSubject operator is essentially a source which accesses a subject with the specified name, at the same scope level or above, and subscribes to it. The behavior of SubscribeSubject is defined by the type of the subject which is accessed, and values from the shared underlying sequence will then be passed to any operators downstream from SubscribeSubject, as if these operators were connected to the subject directly.

Example workflow

Note

If the definition of the underlying subject changes, there is no need to change the SubscribeSubject as long as the name remains the same.

For more information on subjects, the different types of subject available, and the rules for naming and finding subjects, see the Subjects section of the manual.

[WorkflowElementCategory(ElementCategory.Source)]
public class SubscribeSubject : ZeroArgumentExpressionBuilder, IExpressionBuilder, INamedElement
Inheritance
SubscribeSubject
Implements
Derived
Inherited Members
Extension Methods

Properties

Name

Gets or sets the name of the shared subject.

[TypeConverter(typeof(SubjectNameConverter))]
public string Name { get; set; }

Property Value

string

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.