Class StartWithOperator
Extension methods implementing the startWith operator.
public static class StartWithOperator
- Inheritance
-
System.ObjectStartWithOperator
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
sourceObservable<T>The source sequence to emit after the seed values.
valuesT[]The values to emit, in order, before subscribing to
source.
Returns
- Observable<T>
An observable that emits
valuesfollowed by the emissions ofsource.
Type Parameters
TThe type of values in
valuesand emitted bysource.
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.