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

ReactiveUI.Primitives.Advanced.TakeWitness<T>

public sealed class TakeWitness<T> : IObserver<T>, IDisposable
Observer used by Take to dispose the upstream subscription as soon as the requested count is reached.
public TakeWitness(IObserver<T> observer, int count)

Observer used by Take to dispose the upstream subscription as soon as the requested count is reached.

public void Dispose()

public void OnCompleted()

public void OnError(Exception error)

public void OnNext(T value)

public void SetSubscription(IDisposable subscription)

Sets the upstream subscription.