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

ReactiveUI.Primitives.Signals.TapWithSignal<T, TState>

public sealed class TapWithSignal<T, TState> : IRequireCurrentThread<T>, IObservable<T>
Invokes a stateful action for each source value while forwarding the value unchanged, without allocating a per-value closure: the state is stored on the sink and passed to the action for each element.
namespace ReactiveUI.Primitives.Signals { public sealed class TapWithSignal<[System.Runtime.CompilerServices.Nullable(2)] T, [System.Runtime.CompilerServices.Nullable(2)] TState> : IRequireCurrentThread<T>, IObservable<T> { public TapWithSignal(IObservable<T> source, TState state, Action<TState, T> onNext); public bool IsRequiredSubscribeOnCurrentThread(); public IDisposable Subscribe(IObserver<T> observer); } }