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

ReactiveUI.Primitives.Advanced.TakeWhileWitness<T>

public sealed class TakeWhileWitness<T> : IObserver<T>, IDisposable
Sink that forwards values while the predicate holds, then completes and unsubscribes.
public TakeWhileWitness(IObserver<T> observer, Func<T, bool> predicate)

Sink that forwards values while the predicate holds, then completes and unsubscribes.

public void Dispose()

public void OnCompleted()

public void OnError(Exception error)

public void OnNext(T value)

public void SetSubscription(IDisposable subscription)

Assigns the upstream subscription, disposing the incoming one when this sink holds a subscription or has been disposed.