AskOptions
Extensible options for Ask prompts. Groups CancellationToken and Timeout (and future features) in one place to avoid signature churn on IReplInteractionChannel methods.
- Kind:
Class - Namespace: Repl.Interaction
- Assembly:
Repl.Core - Source: src/Repl.Core/Interaction/AskOptions.cs
Signature
Section titled “Signature”public record AskOptions : IEquatable<AskOptions>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”IEquatable<AskOptions>
Constructors
Section titled “Constructors”AskOptions(TimeSpan?, CancellationToken)
Section titled “AskOptions(TimeSpan?, CancellationToken)”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)Parameters
Section titled “Parameters”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. Whendefault, the channel uses the ambient per-command token set by the framework before each command dispatch.
Properties
Section titled “Properties”CancellationToken
Section titled “CancellationToken”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; }Returns
Section titled “Returns”Timeout
Section titled “Timeout”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; }Returns
Section titled “Returns”TimeSpan?