ReactiveUI.Primitives.Extensions
Namespace with 17 public types
Classes
ConcurrencyLimiter`1
Limits the concurrency of task execution and emits results through an observable sequence.
Implements directly so the surface needs no
ActionDisposable closure wrappers; the per-task continuation state is the
per-subscription instance, which is already a reference type
and therefore needs no boxing through .
Continuation
Coordinates phase synchronization between a lock holder and its continuation.
CurrentValueSubject`1
Thread-safe subject that holds the most-recently-emitted value, replays it to new subscribers,
and broadcasts subsequent emissions. Per-emission hot path:
Lock taken only to read the current observer state and update the cached value.Single-observer state lives in a dedicated field — no array allocated for the common case.Multi-observer state uses a copy-on-write IObserver{T}[] snapshot iterated outside the lock.
ScanWithInitialObservable`2
Scans the source sequence and emits the initial value immediately upon subscription.
SingleValueSignal`1
Synchronously emits a single cached value to each subscriber and completes. Drop-in for
the Rx Observable.Return pattern when sharing the observable instance across calls.
TimerSinkState`1
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.
Structures
Heartbeat`1
Represents either a heartbeat signal or a value update from an observable stream. Value-type shape; the
heartbeat operator emits these directly so per-emission allocations are zero. Note that
default(Heartbeat<T>) represents a value update with the default ; use
new Heartbeat<T>() to construct a heartbeat tick.
Stale`1
Represents either a staleness indicator or a value update from an observable stream. Value-type shape;
the stale-detection operator emits these directly so per-emission allocations are zero. Note that
default(Stale<T>) represents a value update with the default ; use
new Stale<T>() to construct a staleness signal.
Enumerations
DrainNotificationKind
Kind of upstream notification enqueued for a ScheduledDrainState<T> drain pass.
Static Classes
FirstAsTaskHelper
Subscribes once and completes the returned with the first emitted value;
faults the task on source error or on empty completion. Combines the
and the IObserver into a single allocation per call.
FirstAsValueTaskHelper`1
-returning counterpart to . Backs the
ToHotValueTask extension with a pooled implementation
so steady-state callers pay zero allocations after the pool warms up.
Observables
Factory methods that build instances. The plural name avoids
resolution collisions with other observable factory types at call sites that import multiple
reactive namespaces.
ObserverArrayHelpers
Pure-plumbing helpers for swap-on-write arrays. Centralizes the
empty-array short-circuit on broadcast and the not-present short-circuit on remove so the
operator hot paths stay branchless on the steady state. Every branch is a pure function
over its inputs and is directly RxVoid-testable through this class.
ObserverExtensions
Extension methods for .
Interfaces
IDrainTarget
Implemented by sinks that drive a ScheduledDrainState<T>. The state helper invokes
once per scheduled burst via a static scheduler callback, so passing the sink
as an keeps the scheduled action allocation-free (no captured closure).
IHeartbeat`1
Heart beat.
IStale`1
Indicator for connection that has become stale.