Table of Contents

Class StartWithOperator

Namespace
RxSharp.Operators
Assembly
RxSharp.dll

Extension methods implementing the startWith operator.

public static class StartWithOperator
Inheritance
System.Object
StartWithOperator

Methods

StartWith<T>(Observable<T>, params T[])

Returns an observable that, at the moment of subscription, synchronously emits values in order, and only then subscribes to source and mirrors its emissions.

public static Observable<T> StartWith<T>(this Observable<T> source, params T[] values)

Parameters

source Observable<T>

The source sequence to emit after the seed values.

values T[]

The values to emit, in order, before subscribing to source.

Returns

Observable<T>

An observable that emits values followed by the emissions of source.

Type Parameters

T

The type of values in values and emitted by source.

Remarks

If the subscriber is disposed while the seed values are still being emitted (for example, a downstream operator like Take unsubscribes after the first value), emission of the remaining seed values stops immediately and source is never subscribed to.