Table of Contents

Class ToList

Namespace
Bonsai.Reactive
Assembly
Bonsai.Core.dll

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

Marble diagram

ToList emits a single list of the same type as the type of the elements in the source sequence. The list 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 ToList
Inheritance
ToList
Inherited Members

Methods

Process<TSource>(IObservable<TSource>)

Creates a list containing every element in the observable sequence.

public IObservable<IList<TSource>> Process<TSource>(IObservable<TSource> source)

Parameters

source IObservable<TSource>

The source sequence to get a list of elements for.

Returns

IObservable<IList<TSource>>

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

Type Parameters

TSource

The type of the elements in the source sequence.