AskSecretOptions
Options for AskSecretAsync(string, string, AskSecretOptions?).
- Kind:
Class - Namespace: Repl.Interaction
- Assembly:
Repl.Core - Source: src/Repl.Core/Interaction/AskSecretOptions.cs
Signature
Section titled “Signature”public record AskSecretOptions : IEquatable<AskSecretOptions>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”IEquatable<AskSecretOptions>
Constructors
Section titled “Constructors”AskSecretOptions(TimeSpan?, char?, bool, CancellationToken)
Section titled “AskSecretOptions(TimeSpan?, char?, bool, CancellationToken)”Options for AskSecretAsync(string, string, AskSecretOptions?).
public AskSecretOptions(TimeSpan? Timeout = null, char? Mask = '*', bool AllowEmpty = false, CancellationToken CancellationToken = default)Parameters
Section titled “Parameters”Timeout(TimeSpan?): Optional timeout for the prompt. When the timeout elapses, an empty string is returned and a countdown is displayed inline.Mask(char?): Character used to echo each typed character. Use'*'for asterisks ornullfor invisible (no echo).AllowEmpty(bool): Whenfalse, the prompt loops until a non-empty value is entered.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”AllowEmpty
Section titled “AllowEmpty”When false, the prompt loops until a non-empty value is entered.
public bool AllowEmpty { get; init; }Returns
Section titled “Returns”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”Character used to echo each typed character. Use '*' for asterisks
or null for invisible (no echo).
public char? Mask { get; init; }Returns
Section titled “Returns”char?
Timeout
Section titled “Timeout”Optional timeout for the prompt. When the timeout elapses, an empty string is returned and a countdown is displayed inline.
public TimeSpan? Timeout { get; init; }Returns
Section titled “Returns”TimeSpan?