<PackageReference Include="System.Reactive" Version="4.2.0-preview.102" />

IObserver<TValue, TResult>

public interface IObserver<TValue, TResult>
Provides a mechanism for receiving push-based notifications and returning a response.
TResult OnCompleted()

Notifies the observer of the end of the sequence.

TResult OnError(Exception exception)

Notifies the observer that an exception has occurred.

TResult OnNext(TValue value)

Notifies the observer of a new element in the sequence.