Skip to content

AskOptions

Extensible options for Ask prompts. Groups CancellationToken and Timeout (and future features) in one place to avoid signature churn on IReplInteractionChannel methods.

public record AskOptions : IEquatable<AskOptions>
  • IEquatable<AskOptions>

Extensible options for Ask prompts. Groups CancellationToken and Timeout (and future features) in one place to avoid signature churn on IReplInteractionChannel methods.

public AskOptions(TimeSpan? Timeout = null, CancellationToken CancellationToken = default)
  • Timeout (TimeSpan?): Optional timeout for the prompt. When the timeout elapses, the default value is auto-selected and a countdown is displayed inline.
  • CancellationToken (CancellationToken): Explicit cancellation token. When default, the channel uses the ambient per-command token set by the framework before each command dispatch.

Explicit cancellation token. When default, the channel uses the ambient per-command token set by the framework before each command dispatch.

public CancellationToken CancellationToken { get; init; }

CancellationToken

Optional timeout for the prompt. When the timeout elapses, the default value is auto-selected and a countdown is displayed inline.

public TimeSpan? Timeout { get; init; }

TimeSpan?