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

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

public sealed class KeepWithSignal<T, TState> : IRequireCurrentThread<T>, IObservable<T>
Filters source values using a caller-supplied state value, without allocating a per-value closure: the state is stored on the sink and passed to the predicate for each element.
public KeepWithSignal(IObservable<T> source, TState state, Func<TState, T, bool> predicate)

Initializes a new instance of the KeepWithSignal<T, U> class.

public static IObservable<T> Create(IObservable<T> source, TState state, Func<TState, T, bool> predicate)

Creates a stateful filter sequence with empty/never short-circuiting.

Determines whether the sink must subscribe on the current thread.

public IDisposable Subscribe(IObserver<T> observer)

Subscribes the observer to the filtered sequence.