Table of Contents

Class EndWithOperator

Namespace
RxSharp.Operators
Assembly
RxSharp.dll

Extension methods implementing the endWith operator.

public static class EndWithOperator
Inheritance
System.Object
EndWithOperator

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

source Observable<T>

The source sequence to emit before the trailing values.

values T[]

The values to emit, in order, once source completes.

Returns

Observable<T>

An observable that emits source's values followed by values.

Type Parameters

T

The type of values emitted by source and in values.

Remarks

If source errors, values are never emitted — the error is forwarded immediately, matching Concat<T>(params Observable<T>[])'s own behavior.