ReactiveUI.Primitives.Advanced.SinkTerminal
Shared terminal-forwarding helpers for single-source sink observers. Each sink computes a
single result and forwards it downstream exactly once, disposing itself afterwards. Centralizing the
forward-then-dispose using scope — and the done latch that guards it — keeps the
individual sinks to their distinguishing accumulation logic and removes the otherwise-identical terminal boilerplate.
Emits a single terminal value, completes observer, then disposes sink.
public static void Complete<TResult>(IObserver<TResult> observer, TResult value, IDisposable sink, ref bool done)
Emits a single terminal value and completes exactly once, latching done, then disposes sink.
Completes observer without a value, then disposes sink.
Completes observer without a value exactly once, latching done, then disposes sink.
Forwards a fault to observer and then disposes sink.
public static void Fault<TResult>(IObserver<TResult> observer, Exception error, IDisposable sink, ref bool done)
Forwards a fault exactly once, latching done, then disposes sink.