Class Subscriber
- Namespace
- RxSharp
- Assembly
- RxSharp.dll
Factory helpers for Subscriber<T>. A non-generic sibling avoids CA1000 (static members on generic types).
public static class Subscriber
- Inheritance
-
System.ObjectSubscriber
Methods
Create<T>(Action<T>?, Action<Exception>?, Action?)
Creates a Subscriber<T> from bare delegates instead of an IObserver<T> instance. Any callback left null is simply not invoked for that notification kind.
public static Subscriber<T> Create<T>(Action<T>? onNext = null, Action<Exception>? onError = null, Action? onComplete = null)
Parameters
onNextAction<T>?Invoked for each value, if provided.
onErrorAction<Exception>?Invoked on error, if provided; otherwise the error is forwarded to OnUnhandledError.
onCompleteAction?Invoked on completion, if provided.
Returns
- Subscriber<T>
A new Subscriber<T> wrapping the given delegates.
Type Parameters
TThe type of values the subscriber accepts.