Class EndWithOperator
Extension methods implementing the endWith operator.
public static class EndWithOperator
- Inheritance
-
System.ObjectEndWithOperator
Remarks
The mirror image of StartWith<T>(Observable<T>, params T[]): matches rxjs's own endWith.ts
exactly, which is literally concat(source, of(...values)) — delegating to the existing, already-correct
Concat<T>(params Observable<T>[]) and Of<T>(params T[]) rather than writing new subscribe
logic, so there is no new disposal-cascade risk to reason about here.
Methods
EndWith<T>(Observable<T>, params T[])
Returns an observable that mirrors source, then, once it completes, synchronously
emits values in order before completing itself.
public static Observable<T> EndWith<T>(this Observable<T> source, params T[] values)
Parameters
sourceObservable<T>The source sequence to emit before the trailing values.
valuesT[]The values to emit, in order, once
sourcecompletes.
Returns
- Observable<T>
An observable that emits
source's values followed byvalues.
Type Parameters
TThe type of values emitted by
sourceand invalues.
Remarks
If source errors, values are never emitted — the error is
forwarded immediately, matching Concat<T>(params Observable<T>[])'s own behavior.