Type reference
Every operator in ReactiveUI.Primitives is built from public types, so you can construct them yourself when you write
an operator of your own. The operator pages show the types you are most likely to use. This page lists the rest, so
every public type has a home.
You never need these to use the library. Call the operators. For async streams, see the
async type reference.
The words used on this page
| Word | What it is |
| Signal | A class that implements IObservable<T>. Subscribing to it starts the operator's work. |
| Witness or sink | A class that implements IObserver<T>. The signal subscribes it to the source, and it passes results on. |
| Subscription | A class you dispose to stop a running signal. |
| Coordinator | A class that holds the state for one subscription when an operator watches more than one thing. |
| Aggregator | A small struct that holds a running result, such as a count, and hands back a new copy for each value. |
| Extensions class | A static class that holds extension methods. Its methods are documented as operators. |
Each table below says where the operator behind a type is documented. See writing your own operator
for how the pieces fit together.
ReactiveUI.Primitives
| Type | What it is | Documented with |
AnonymousSignal<T> | A signal made from a subscribe lambda, for code of your own. | Writing your own operator |
ConnectableSignalExtensions | Holds the sharing operators for connectable signals. | Sharing |
ConnectableSignalRxNameExtensions | Holds the System.Reactive names of the sharing operators, such as Publish and RefCount. | Sharing |
ExceptionExtensions | Holds Throw, which rethrows an exception without losing its stack trace. | Error handling |
Handle<T>, Handle<T1, T2>, Handle<T1, T2, T3> | Shared, cached lambdas that do nothing or rethrow, so operators need not allocate their own. | Writing your own operator |
SubscribeExtensions | Holds the Subscribe overloads that take lambdas. | Utility |
ReactiveUI.Primitives.Advanced
Creating streams
| Type | What it is | Documented with |
AfterSignal, AfterSubscription | The signal and subscription behind Signal.After. | Creation factories |
AsyncCreateSignal<T> | A signal made from an async subscribe lambda. | Signal.Create |
AsyncDeferSignal<T> | A signal whose source is built by an async lambda on each subscription. | Signal.Lazy |
AsyncEnumerableSignal<T> | A signal that sends the items of an IAsyncEnumerable<T>. | Creation factories |
AsyncSubscriptionLifetime | Holds the cancellation and the inner subscription for the async creation signals. | Creation factories |
CreateSink<T> | The witness behind Signal.Create. It passes notifications on until the stream ends. | Signal.Create |
EmptySignal<T> | Completes without a value, on a sequencer. | Signal.Empty |
EmptyWitness<T> | A witness whose missing lambdas do nothing, used by the Subscribe overloads. | Utility |
EverySignal | The timer behind Signal.Every. | Signal.Every |
FromAsyncSignal<T>, FromAsyncSubscription<T> | The signal and subscription behind Signal.FromAsync. Each subscriber gets its own task and token. | Signal.FromAsync |
FromAsyncExternalCancellationSignal<T> | Signal.FromAsync with a token you pass in. Cancelling it fails the stream. | Signal.FromAsync |
FromEnumerableSignal<T> | Sends the items of a collection. | Signal.FromEnumerable |
FromEventConversionSignal<TEventHandler, TCallback, TResult> | Signal.FromEvent with a conversion lambda. | From an event |
FromEventPatternSignal<TEventHandler, TEventArgs> | The signal behind Signal.FromEventPattern. | From an event |
GuardedWitness<T> | The witness behind Signal.CreateSafe. It releases the source when the stream ends or your callback throws. | Signal.CreateSafe |
ImmediateReturnSignal<T>, ImmutableReturnTrueSignal, ImmutableReturnFalseSignal, ImmutableReturnInt32Signal, ImmutableReturnRxVoidSignal | Signal.Emit on the calling thread. The fixed-value types are shared single instances. | Signal.Emit |
ImmediateThrowSignal<T> | Signal.Fail on the calling thread. | Signal.Fail |
ImmutableEmptySignal<T> | Signal.Empty on the calling thread, as a shared instance. | Signal.Empty |
ImmutableNeverSignal<T> | Signal.Silent: never sends and never ends. | Signal.Silent |
LoopSignal<T> | Sends the same value over and over until disposed, for Signal.Repeat with no count. | Creation factories |
RangeSignal | The signal behind Signal.Range. | Signal.Range |
RepeatSignal<T> | Sends one value a set number of times. | Signal.Repeat |
ReturnSignal<T> | Signal.Emit on a sequencer. | Signal.Emit |
ScheduledEnumerableSignal<T> | Sends the items of a collection on a sequencer. | Signal.FromEnumerable |
SequenceSignal | Sends a run of integers on a sequencer, for Signal.Range with a sequencer. | Creation factories |
StartSignal, StartSignal<T> | The signals behind Signal.Start, for an action and for a function. | Signal.Start |
TaskInstanceSignal<T>, TaskInstanceSubscription | Sends the result of a task you already have. | Creation factories |
ThrowSignal<T> | Signal.Fail on a sequencer. | Signal.Fail |
UnfoldSignal<TState, TResult> | The signal behind Signal.Unfold. | Signal.Unfold |
UseSignal<TResource, T> | The signal behind Signal.Use. It disposes the resource once, when the stream ends or you dispose. | Signal.Use |
Changing and filtering values
| Type | What it is | Documented with |
AsObservableSignal<T> | Hides the type of the source. | Utility |
CastWitness<TResult> | The witness behind Cast. | Filtering |
DefaultIfEmptyWitness<T> | The witness behind DefaultIfEmpty. | Filtering |
DistinctWitness<T>, DistinctByWitness<T, TKey> | The witnesses behind Distinct and DistinctBy. | Filtering |
IgnoreValuesWitness<T> | The witness behind IgnoreValues: drops every value and keeps the ending. | Filtering |
KeepNotNullWitness<T> | The witness behind WhereNotNull. | Filtering |
KeepTypeWitness<TResult> | The witness behind OfType. | Filtering |
MapIndexedWitness<TSource, TResult> | The witness behind Select with an index. | Transformation |
SelectManyEnumerableSignal<TSource, TResult>, SelectManyEnumerableWitness<TSource, TResult> | SelectMany where each value turns into a collection. | Transformation |
SelectManyResultSignal<TSource, TCollection, TResult> | SelectMany with a result lambda. | Transformation |
SkipWitness<T>, SkipWhileWitness<T> | The witnesses behind Skip and SkipWhile. | Filtering |
SparkWitness<T>, UnsparkWitness<T> | The witnesses behind Spark and Unspark, which turn notifications into values and back. | Transformation |
SwitchWitness<T> | The witness behind SwitchTo. | Transformation |
TakeWitness<T>, TakeWhileWitness<T> | The witnesses behind Take and TakeWhile. | Filtering |
TimeIntervalWitness<T> | The witness behind TimeInterval. | Transformation |
UniqueWitness<T>, UniqueByWitness<T, TKey> | The witnesses behind Unique and UniqueBy. | Filtering |
Joining streams
| Type | What it is | Documented with |
AppendWitness<T>, AppendDelegateWitness<T> | The witnesses behind Append. | Combination |
BlendSignal<T>, EnumerableBlendSignal<T>, BlendWitness<T> | Blend on a stream of streams and on a collection. | Combination |
ChainSignal<T>, ChainWitness<T> | The signal and witness behind Concat. | Combination |
ForkJoinSignal<TLeft, TRight, TResult>, ForkJoinWitness<TLeft, TRight, TResult> | ForkJoin on two streams: the final value of each, once both complete. | Combination |
MaxConcurrentEnumerableBlendSignal<T> | Blend on a collection, with a limit on how many run at once. | Combination |
MergeSignal<T> | Blend on two streams or a collection, with an optional limit. | Combination |
PairSignal<TLeft, TRight, TResult>, PairWitness<TLeft, TRight, TResult> | The signal and witness behind Zip. | Combination |
RaceSignal<T>, RaceWitness<T> | The signal and witness behind Race. | Combination |
RangeCombineLatestSignal<TResult>, RangeConcatSignal, RangeForkJoinSignal<TResult>, RangeSyncLatestSignal<TResult>, RangeWithLatestSignal<TResult>, RangeZipSignal<TResult> | Faster forms of SyncLatest, Concat, ForkJoin, Latch and Zip used when every source is a Signal.Range. | Combination |
SyncLatestSignal<TLeft, TRight, TResult>, SyncLatestWitness<TLeft, TRight, TResult> | SyncLatest on two streams. | Combination |
TaskChainSignal<T> | Concat on a stream of tasks. | Combination |
Time, sharing and threads
| Type | What it is | Documented with |
AutoShareSubscription<T> | The subscription handle behind AutoShare, which counts subscribers. | Sharing |
BufferSignal<T>, BufferWitness<T>, BufferEachWitness<T> | Buffer by time and by count. BufferEachWitness<T> handles a count of one. | Time |
CollectWitness<T>, CollectListWitness<T>, CollectArrayWitness<T> | CollectWitness<T> is behind Buffer by time. The other two are behind ToList and ToArray. | Time, Aggregation |
EmitIfQuietSignal<T>, EmitIfQuietWitness<T> | The signal and witness behind EmitIfQuiet. | Time |
PublishSelectorSignal<TSource, TResult> | Publish(selector): shares a stream for one expression. | Sharing |
SerializeWitness<T> | The witness behind Serialize. | Utility |
SynchronizeGateSignal<T>, SynchronizeObjectSignal<T>, SynchronizeObjectWitness<T>, SynchronizeWitness<T> | Synchronize, with a shared gate or an object you lock on. | Utility |
TapWitness<T> | The witness behind Tap. | Utility |
Results
| Type | What it is | Documented with |
AggregateWitness<T, TResult, TAggregator> | Runs an aggregator over every value and sends its result at the end. | Aggregation |
AllPredicateWitness<T>, AnyWitness<T>, AnyPredicateWitness<T>, ContainsWitness<T>, IsEmptyWitness<T> | The witnesses behind All, Any, Contains and IsEmpty. | Aggregation |
CountAggregator<T>, CountPredicateAggregator<T>, LongCountAggregator<T>, LongCountPredicateAggregator<T> | The aggregators behind Count and LongCount. | Aggregation |
DistinctByCountAggregator<T, TKey>, DistinctByLongCountAggregator<T, TKey> | Aggregators that count distinct keys. | Aggregation |
FoldWitness<TSource, TAccumulate> | The witness behind Fold. | Aggregation |
IAggregator<T, TResult, TSelf> | The interface an aggregator implements: Add hands back a new state, and Result reads it. | Aggregation |
ReduceWitness<TSource, TAccumulate> | The witness behind Aggregate. | Aggregation |
TaskAnyWitness<T>, TaskCountWitness<T> | The witnesses behind AnyAsync and CountAsync. | Aggregation |
Witnesses and plumbing
| Type | What it is | Documented with |
CallbackWitness<T> | A witness that calls lambdas, used by SubscribeAsync. | Tasks |
CopyOnWriteList<T> | A list that makes a new array on each change, so readers never need a lock. Signals hold their subscribers in one. | Signals |
DisposedMarker | The value a subscription slot holds once released. | SubscriptionSlots |
DisposedWitness<T> | A witness that throws ObjectDisposedException. AsyncSignal<T> swaps it in once disposed. | Signals |
ForwardingWitness<T> | A witness that passes every notification to another witness. | Writing your own operator |
ListWitness<T> | A witness that sends each notification to a list of witnesses, such as the subscribers of AsyncSignal<T>. | Signals |
RepeatSourceWitness<T> | The witness behind Repeat on a stream. It drops a second ending. | Error handling |
SignalSubscription | Shared methods that signals use to subscribe their witnesses. | Writing your own operator |
StatefulWitness<T, TState> | A witness that calls lambdas with a state value, so they can be static. | Witness.Create |
ThrowWitness<T> | A witness that ignores values and throws any error it gets. | Error handling |
ReactiveUI.Primitives.Concurrency
| Type | What it is | Documented with |
SequencerExtensions | Holds the Schedule overloads for any ISequencer. | Scheduling |
VirtualTimeSequencerExtensions | Holds helpers for virtual time sequencers. | Testing with a virtual clock |
IScheduledItem<TAbsolute>, ScheduledItem<TAbsolute>, ScheduledItem | A piece of work waiting in a queue for its due time, and the method that creates one. | Writing your own sequencer |
SequencerQueue<TAbsolute> | The queue a virtual time sequencer keeps its work in, ordered by due time. | Writing your own sequencer |
IStopwatchProvider | Something that can start an IStopwatch. VirtualClock is one. | Testing with a virtual clock |
DispatcherQueueSequencerExtensions | Holds ToSequencer for a WinUI DispatcherQueue. | UI platforms |
MauiDispatcherSequencerExtensions | Holds ToSequencer for a MAUI IDispatcher. | UI platforms |
BlazorRendererSequencerExtensions, in ReactiveUI.Primitives.Blazor.Concurrency, holds ToSequencer for a Blazor
Dispatcher. See UI platforms.
ReactiveUI.Primitives.Core
| Type | What it is | Documented with |
PriorityQueue<T> | A priority queue that keeps items with equal priority in the order they were added. The sequencers and PrioritySemaphoreSignal<T> use it. | Scheduling, Signals |
SparkKind | Whether a Spark holds a value, an error or a completion. | Transformation |
ReactiveUI.Primitives.Signals
| Type | What it is | Documented with |
Awaiter, AwaitWitness<T> | What makes await stream work. | await a stream directly |
Broadcaster<T> | The struct a signal uses to send to its subscribers. It needs no allocation for one subscriber. | Signals |
CommandExecution<TResult> | What CommandSignal<TResult> hands back when run. You can await it. | CommandSignal<TResult> |
DelegateWitness<T> | The witness Witness.Create builds. It calls your lambdas, and skips an ending with no lambda. | Witness.Create |
ObserverHandler<T> | The subscription a signal hands back. Disposing it removes the subscriber once. | Signals |
SignalExtensions | Holds the operators on IObservable<T> that live in this namespace, such as WitnessOn, OnCleanup and Recover. | Utility, Error handling |
StateSignalExtensions | Holds ToReadOnlyState. | Sharing |
ReactiveUI.Primitives.Extensions
| Type | What it is | Documented with |
ObservableSubscriptionExtensions | Holds WaitForValue, WaitForError and the other helpers that block until a stream sends. | State and testing |
ObserverExtensions | Holds FastForEach, which sends every item of a collection to a witness. | Utility |
DrainNotificationKind | Whether a queued notification is a value, an error or a completion, for helpers that queue notifications such as Conflate. | Timing |
ReactiveUI.Primitives.Extensions.Operators
| Type | What it is | Documented with |
BinaryMinMaxObservable<T>, MinMaxObservable<T> | The streams behind GetMax and GetMin. | Values |
BooleanReduceObservable | The stream behind CombineLatestValuesAreAllTrue and CombineLatestValuesAreAllFalse. | Values |
BufferUntilObservable | The stream behind BufferUntil. | Values |
CachedObservables | Holds UnitDefault, a shared stream that sends one RxVoid and completes. | Values |
FilterRegexObservable | The stream behind Filter, which keeps strings that match a regular expression. | Values |
FirstMatchFromCandidatesObservable<TKey, TRaw, TResult> | The stream behind FirstMatchFromCandidates. | Values |
LatestOrDefaultObservable<T> | The stream behind LatestOrDefault. | Values |
NotObservable | The stream behind Not. | Values |
SelectConstantObservable<TSource, TResult> | Sends the same value for every source value. | Values |
SelectManyThenObservable<TSource, TMid, TResult> | The stream behind SelectManyThen. | Values |
ShuffleObservable<T> | The stream behind Shuffle. | Values |
SkipWhileNullObservable<T> | The stream behind SkipWhileNull. | Values |
SwitchIfEmptyObservable<T> | The stream behind SwitchIfEmpty. | Values |
FirstMatchFromCandidatesObservable<TKey, TRaw, TResult>.SyncProbe | A witness that records whether a candidate stream sent a value, failed or completed straight away. | Values |
TakeUntilInclusiveObservable<T> | The stream behind TakeUntil with a test. | Values |
WaitUntilObservable<T> | The stream behind WaitUntil. | Values |
WhereTrueObservable, WhereFalseObservable | The streams behind WhereTrue and WhereFalse. | Values |
WhereSelectObservable<TIn, TOut> | Filters and changes values in one step. | Values |
The two package flavours
ReactiveUI.Primitives.Reactive has every type on this page under ReactiveUI.Primitives.Reactive.*, compiled against
System.Reactive.