<PackageReference Include="ReactiveUI.Primitives.Core" Version="7.4.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 it if one is already held.