Table of Contents

Class Publish

Namespace
Bonsai.Reactive
Assembly
Bonsai.Core.dll

Represents an expression builder that shares a single subscription to an observable sequence across the encapsulated workflow.

Publish surfaces the observable sequence to the nested workflow using a PublishSubject.

Marble diagram

PublishSubject passes to each subscribed observer only the values from the source sequence which were emitted after the time of subscription.

This fire-and-forget behavior means that any observers which subscribe late might lose one or more items emitted between the time that PublishSubject was created and the time that the observer subscribed to it. If you require guaranteed delivery of all values from the source sequence, you need to ensure that all observers subscribe immediately upon workflow initialization. If this is not possible, you should consider switching to an AsyncSubject if the sequence contains a single value, or a ReplaySubject if the sequence contains multiple values.

If the source sequence terminates with an error, PublishSubject will not emit any items to subsequent observers, but will pass along the terminating error.

public class Publish : MulticastBuilder, IWorkflowExpressionBuilder, INamedElement, IPropertyMappingBuilder, IExpressionBuilder
Inheritance
Publish
Implements
Inherited Members
Extension Methods

Constructors

Publish()

Initializes a new instance of the Publish class.

public Publish()

Publish(ExpressionBuilderGraph)

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

public Publish(ExpressionBuilderGraph workflow)

Parameters

workflow ExpressionBuilderGraph

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