Skip to content

PollConditionOptions

Namespace: E2E.Internal

public sealed class PollConditionOptions

What PollConditionAsync(PollConditionOptions) polls, and how it ends.

Inheritance: object

View source

public required TimeProvider Clock { get; init; }

Value: TimeProvider

public required Deadline Deadline { get; init; }

Value: Deadline

public required Func<Task<bool?>> Evaluate { get; init; }

Evaluates the positive condition once, every read bounded by the deadline: a read on a longer budget outlasts the poll. Returns null when the condition cannot be evaluated yet: the positive poll keeps waiting and the negation grace window resets.

Value: Func<Task<bool?>>

public TimeSpan Interval { get; init; }

The longest pause between reads.

Value: TimeSpan

public required bool Negated { get; init; }

Value: bool

public required Func<Exception?, Exception> OnTimeout { get; init; }

Builds the poll’s failure; the argument is the read the deadline cut off, when one did.

Value: Func<Exception, Exception>

public required CancellationToken Token { get; init; }

Value: CancellationToken