Table of Contents

Class ReplaySubject<T>

Namespace
Bonsai.Reactive
Assembly
Bonsai.Core.dll

Represents an expression builder that replays the values of other observable sequences to all subscribed and future observers.

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<T> : SubjectBuilder<T>, IExpressionBuilder, INamedElement

Type Parameters

T

The type of the elements processed by the subject.

Inheritance
ReplaySubject<T>
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

CreateSubject()

Creates a shared subject that replays the values of other observable sequences to all subscribed and future observers.

protected override ISubject<T> CreateSubject()

Returns

ISubject<T>

A new instance of ISubject<T>.