API Reference
Class
ConfirmPrompt
A yes/no question with the default shown: ? Continue? [ Yes ] No. Y and N answer at once, arrows move between the answers, Enter takes the focused one, Esc answers no.
Inheritance
- Prompt<Boolean>
- ConfirmPrompt
Constructors
ConfirmPrompt 2 overloads
Methods
public override String Describe(Boolean value) #Returns:
StringThe answer as text, for the summary line left in the scrollback.
Parameters
- value System.Boolean
- The answer.
Returns
The text.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?
public Boolean Show(InteractiveOptions? options = null, CancellationToken cancellationToken = default) #Returns:
BooleanInherited from 0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Parameters
- options InteractiveOptions? = null
- cancellationToken CancellationToken = default
public Task<Boolean> ShowAsync(InteractiveOptions? options = null, CancellationToken cancellationToken = default) #Returns:
Task<Boolean>Inherited from 0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Parameters
- options InteractiveOptions? = null
- cancellationToken CancellationToken = default
public Boolean TryShow(out Boolean value, InteractiveOptions? options = null, CancellationToken cancellationToken = default) #Returns:
BooleanInherited from 0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Parameters
- value Boolean
- options InteractiveOptions? = null
- cancellationToken CancellationToken = default
Properties
public Boolean Destructive { get; set; } #Marks the question as destructive: a warning mark, and No is focused unless the default says otherwise.
public String? YesText { get; set; } #The caption of the positive answer; null uses the labels.
public String? NoText { get; set; } #The caption of the negative answer; null uses the labels.
Inherited Properties
public String Title { get; set; } #Inherited from 0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
public String? Description { get; set; } #Inherited from 0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
public String? ParameterName { get; set; } #Inherited from 0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
public Boolean HasDefault { get; } #Inherited from 0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
public Boolean Default { get; set; } #Inherited from 0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]