Table of Contents

Class ReplaySubject

Namespace
Bonsai.Reactive
Assembly
Bonsai.Core.dll

Represents an expression builder that replays the values of an observable sequence to all subscribed and future observers using a shared subject.

Marble diagram

ReplaySubject passes to each subscribed observer all the values from the source sequence, regardless of when the observer subscribes.

Any observers which subscribe late will immediately receive all values which were sent out between the time that ReplaySubject was created and the time that the observer subscribed to it. It is also possible to parameterize the ReplaySubject to throw away old values after a certain period of time, or after a specified buffer size is exceeded.

[WorkflowElementIcon("ReplaySubject")]
public class ReplaySubject : SubjectBuilder, IExpressionBuilder, INamedElement
Inheritance
ReplaySubject
Implements
Inherited Members
Extension Methods

Properties

BufferSize

Gets or sets the maximum element count of the replay buffer.

public int? BufferSize { get; set; }

Property Value

int?

Window

Gets or sets the maximum time length of the replay buffer.

public TimeSpan? Window { get; set; }

Property Value

TimeSpan?

Methods

BuildSubject(Expression)

When overridden in a derived class, returns the expression that creates the shared subject.

protected override Expression BuildSubject(Expression expression)

Parameters

expression Expression

The expression representing the observable input sequence.

Returns

Expression

The Expression that creates the shared subject.