API Reference
Class
TypedConfirmPrompt
The confirmation for destructive actions: the user types a given text (a name, a domain) before Enter is accepted. Returns true when confirmed and false when the user backs out with Esc.
Inheritance
- Prompt<Boolean>
- TypedConfirmPrompt
Constructors
public TypedConfirmPrompt(String title, String expected) #Creates a typed confirmation.
Parameters
- title System.String
- The question ("Remove 3 servers from the inventory?").
- expected System.String
- The text to type.
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 String? Warning { get; set; } #A warning under the question (default: none).
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]]