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

ReactiveUI.Primitives.Signals.DelegateWitness<T>

public sealed class DelegateWitness<T> : IObserver<T>
A lightweight IObserver<T> that forwards each notification to the supplied delegates. Use it to subscribe to an IObservable<T> without allocating a bespoke observer class. The onError and onCompleted delegates are optional; when omitted the corresponding terminal notification is ignored.
namespace ReactiveUI.Primitives.Signals { public sealed class DelegateWitness<[System.Runtime.CompilerServices.Nullable(2)] T> : IObserver<T> { public DelegateWitness(Action<T> onNext, Action<Exception> onError = null, Action onCompleted = null); public void OnNext(T value); public void OnError(Exception error); public void OnCompleted(); } }