Table of Contents

Class ToArrayOperator

Namespace
RxSharp.Operators
Assembly
RxSharp.dll

Implements the ToArray operator. Mirrors rxjs's toArray.

public static class ToArrayOperator
Inheritance
System.Object
ToArrayOperator

Methods

ToArray<T>(Observable<T>)

Buffers every value emitted by source and, once it completes, emits them all as a single list, then completes.

public static Observable<IReadOnlyList<T>> ToArray<T>(this Observable<T> source)

Parameters

source Observable<T>

The source observable to buffer.

Returns

Observable<IReadOnlyList<T>>

An observable that emits a single list of every value from source, then completes.

Type Parameters

T

The element type of the source observable.

Remarks

If source errors, no list is emitted — the error is forwarded directly instead.