ReactiveUI.Primitives.Extensions.TimerSinkState<T>
Shared lock + timer + done-flag triple used by the synchronous timer-driven operator sinks
(Debounce-Until, Detect-Stale, Throttle-Distinct, Buffer-Until-Idle, etc.). Each of those sinks
previously hand-rolled three identical OnError / OnCompleted / Dispose method bodies on top of
the same fields; this helper centralises the bodies so the per-sink class only carries the
operator-specific OnNext logic. Sinks compose one instance and forward to it — no base class.
namespace ReactiveUI.Primitives.Extensions
{
public sealed class TimerSinkState<[Nullable(2)] T>
{
public SwapDisposable Timer { get; }
public bool Done { get; }
public TimerSinkState(IObserver<T> downstream);
public void HandleErrorLocked(Exception error);
public void HandleCompletedLocked();
public void HandleDisposeLocked();
}
}