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

IObserver<TValue, TResult>

public interface IObserver<TValue, TResult>
Provides a mechanism for receiving push-based notifications and returning a response.
using System.Runtime.CompilerServices; namespace System.Reactive { [System.Runtime.CompilerServices.NullableContext(1)] public interface IObserver<[System.Runtime.CompilerServices.Nullable(2)] in TValue, [System.Runtime.CompilerServices.Nullable(2)] out TResult> { TResult OnNext(TValue value); TResult OnError(Exception exception); TResult OnCompleted(); } }