Table of Contents

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.Object
Subscriber

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

onNext Action<T>?

Invoked for each value, if provided.

onError Action<Exception>?

Invoked on error, if provided; otherwise the error is forwarded to OnUnhandledError.

onComplete Action?

Invoked on completion, if provided.

Returns

Subscriber<T>

A new Subscriber<T> wrapping the given delegates.

Type Parameters

T

The type of values the subscriber accepts.