TextPromptFluent
ConsoleMonster.Interactive
The fluent methods of TextPrompt, generated from its public properties: A property-named method sets a property and Add... adds to a collection, both returning the same instance.
Inheritance
- object
- TextPromptFluent
Methods
public static TextPrompt AddHistory(TextPrompt textPrompt, string item) #Adds an item to TextPrompt.History: Earlier answers offered with Up and Down (oldest first).
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- item string
- The item.
public static TextPrompt AddHistory(TextPrompt textPrompt, params string[] items) #Adds items to TextPrompt.History: Earlier answers offered with Up and Down (oldest first).
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- items string[]
- The items, in order.
public static TextPrompt AddHistory(TextPrompt textPrompt, IEnumerable<string> items) #Adds items to TextPrompt.History: Earlier answers offered with Up and Down (oldest first).
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static TextPrompt Configure(TextPrompt textPrompt, Action<TextPrompt> configure) #Assigns callbacks and related configuration without invoking delegate-valued properties.
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- configure System.Action<ConsoleMonster.Interactive.TextPrompt>
- Assignments applied in order.
Examples
// C# initializer or property // C# fluent
textPrompt.Validator = value; Ui.TextPrompt().Configure(configured => configured.Validator = value);public static TextPrompt Default(TextPrompt textPrompt, string value) #Sets Prompt<string>.Default: The default answer: pre-selected, accepted with Enter, and returned in non-interactive sessions.
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
textPrompt.Default = value; Ui.TextPrompt().Default(value);public static TextPrompt Description(TextPrompt textPrompt, string? value) #Sets Prompt<string>.Description: Help text under the question.
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
textPrompt.Description = value; Ui.TextPrompt().Description(value);public static TextPrompt MaxLength(TextPrompt textPrompt, int value) #Sets TextPrompt.MaxLength: The most characters the box takes.
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
textPrompt.MaxLength = value; Ui.TextPrompt().MaxLength(value);public static TextPrompt MinLength(TextPrompt textPrompt, int value) #Sets TextPrompt.MinLength: The fewest characters accepted.
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
textPrompt.MinLength = value; Ui.TextPrompt().MinLength(value);public static TextPrompt ParameterName(TextPrompt textPrompt, string? value) #Sets Prompt<string>.ParameterName: The parameter that supplies this value non-interactively (-Domain, --domain); named in the non-interactive error message.
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
textPrompt.ParameterName = value; Ui.TextPrompt().ParameterName(value);public static TextPrompt Pattern(TextPrompt textPrompt, string? value) #Sets TextPrompt.Pattern: A pattern the whole answer must match.
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
textPrompt.Pattern = value; Ui.TextPrompt().Pattern(value);public static TextPrompt PatternMessage(TextPrompt textPrompt, string? value) #Sets TextPrompt.PatternMessage: The message when TextPrompt.Pattern does not match.
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
textPrompt.PatternMessage = value; Ui.TextPrompt().PatternMessage(value);public static TextPrompt Placeholder(TextPrompt textPrompt, string? value) #Sets TextPrompt.Placeholder: Muted text in the empty box.
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
textPrompt.Placeholder = value; Ui.TextPrompt().Placeholder(value);public static TextPrompt PrefillDefault(TextPrompt textPrompt, bool value) #Sets TextPrompt.PrefillDefault: Starts with the default in the box (editable) instead of showing it as a hint.
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- value bool
- The value.
Examples
// C# initializer or property // C# fluent
textPrompt.PrefillDefault = value; Ui.TextPrompt().PrefillDefault(value);public static TextPrompt PrefillDefault(TextPrompt textPrompt) #Sets TextPrompt.PrefillDefault to true.
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance to configure.
public static TextPrompt Required(TextPrompt textPrompt, bool value) #Sets TextPrompt.Required: Whether an empty answer is refused (when there is no default).
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- value bool
- The value.
Examples
// C# initializer or property // C# fluent
textPrompt.Required = value; Ui.TextPrompt().Required(value);public static TextPrompt Required(TextPrompt textPrompt) #Sets TextPrompt.Required to true.
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance to configure.
public static TextPrompt Title(TextPrompt textPrompt, string value) #Sets Prompt<string>.Title: The question.
Parameters
- textPrompt ConsoleMonster.Interactive.TextPrompt
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
textPrompt.Title = value; Ui.TextPrompt().Title(value);