<PackageReference Include="System.Reactive" Version="5.0.0" />

AnonymousObserver<T>

public sealed class AnonymousObserver<T> : ObserverBase<T>
Class to create an IObserver<T> instance from delegate-based implementations of the On* methods.
public AnonymousObserver(Action<T> onNext, Action<Exception> onError, Action onCompleted)

Creates an observer from the specified OnNext, OnError, and OnCompleted actions.

public AnonymousObserver(Action<T> onNext)

Creates an observer from the specified OnNext action.

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

Creates an observer from the specified OnNext and OnError actions.

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

Creates an observer from the specified OnNext and OnCompleted actions.