<PackageReference Include="ReactiveUI.Primitives.Core" Version="8.0.0" />

ReactiveUI.Primitives.Advanced.EmptyWitness<T>

public sealed class EmptyWitness<T> : IObserver<T>
Delegate-backed observer that defaults missing handlers to no-op behavior.
public static readonly EmptyWitness<T> Instance

Gets the shared no-op witness instance.

public EmptyWitness(Action<T> onNext)

Initializes a new instance of the EmptyWitness<T> class.

public EmptyWitness(Action<T> onNext, Action<Exception> onError)

Initializes a new instance of the EmptyWitness<T> class.

public EmptyWitness(Action<T> onNext, Action onCompleted)

Initializes a new instance of the EmptyWitness<T> class.

public EmptyWitness(Action<T> onNext, Action<Exception> onError, Action onCompleted)

Initializes a new instance of the EmptyWitness<T> class.

public void OnCompleted()

Invokes the completion callback, doing nothing when none was supplied.

public void OnError(Exception error)

Invokes the error callback, swallowing the error when none was supplied.

public void OnNext(T value)

Invokes the value callback.