<PackageReference Include="ReactiveUI.Primitives" Version="8.1.0" />

ReactiveUI.Primitives.Advanced.TaskAnyWitness<T>

public sealed class TaskAnyWitness<T> : IObserver<T>, IDisposable
Task-producing terminal sink that completes with whether a source produced a matching value.
public Task<bool> Task { get; }

Gets the task completed by this sink.

public TaskAnyWitness(CancellationToken cancellationToken)

Initializes a new instance of the TaskAnyWitness<T> class.

public TaskAnyWitness(Func<T, bool> predicate, CancellationToken cancellationToken)

Initializes a new instance of the TaskAnyWitness<T> class.

public void Dispose()

public void OnCompleted()

public void OnError(Exception error)

public void OnNext(T value)

public void RegisterCancellation()

Registers cancellation after construction.

public void SetSubscription(IDisposable subscription)

Assigns the source subscription.