Table of Contents

Class ToArray

Namespace
Bonsai.Reactive
Assembly
Bonsai.Core.dll

Represents an operator that creates an array containing every element in the observable sequence.

Marble diagram

ToArray emits a single array of the same type as the type of the elements in the source sequence. The array is emitted when the source sequence completes successfully.

Warning

If the source sequence is infinite (i.e. does not terminate), this operator will never emit the collection, and will keep accumulating all elements from the source sequence indefinitely, with likely impacts on available memory.

[Combinator]
public class ToArray
Inheritance
ToArray
Inherited Members

Methods

Process<TSource>(IObservable<TSource>)

Creates an array containing every element in the observable sequence.

public IObservable<TSource[]> Process<TSource>(IObservable<TSource> source)

Parameters

source IObservable<TSource>

The source sequence to get an array of elements for.

Returns

IObservable<TSource[]>

An observable sequence containing a single element with the array of all elements in the source sequence.

Type Parameters

TSource

The type of the elements in the source sequence.