PathPromptFluent
ConsoleMonster.Interactive
The fluent methods of PathPrompt, 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
- PathPromptFluent
Methods
public static PathPrompt AddExtension(PathPrompt pathPrompt, string item) #Adds an item to PathPrompt.Extensions: File extensions offered as suggestions (".csv", ".json"); empty offers every file.
Parameters
- pathPrompt ConsoleMonster.Interactive.PathPrompt
- The instance.
- item string
- The item.
public static PathPrompt AddExtensions(PathPrompt pathPrompt, params string[] items) #Adds items to PathPrompt.Extensions: File extensions offered as suggestions (".csv", ".json"); empty offers every file.
Parameters
- pathPrompt ConsoleMonster.Interactive.PathPrompt
- The instance.
- items string[]
- The items, in order.
public static PathPrompt AddExtensions(PathPrompt pathPrompt, IEnumerable<string> items) #Adds items to PathPrompt.Extensions: File extensions offered as suggestions (".csv", ".json"); empty offers every file.
Parameters
- pathPrompt ConsoleMonster.Interactive.PathPrompt
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static PathPrompt BasePath(PathPrompt pathPrompt, string? value) #Sets PathPrompt.BasePath: The folder relative paths start from; null uses the current directory.
Parameters
- pathPrompt ConsoleMonster.Interactive.PathPrompt
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
pathPrompt.BasePath = value; Ui.PathPrompt().BasePath(value);public static PathPrompt Default(PathPrompt pathPrompt, string value) #Sets Prompt<string>.Default: The default answer: pre-selected, accepted with Enter, and returned in non-interactive sessions.
Parameters
- pathPrompt ConsoleMonster.Interactive.PathPrompt
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
pathPrompt.Default = value; Ui.PathPrompt().Default(value);public static PathPrompt Description(PathPrompt pathPrompt, string? value) #Sets Prompt<string>.Description: Help text under the question.
Parameters
- pathPrompt ConsoleMonster.Interactive.PathPrompt
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
pathPrompt.Description = value; Ui.PathPrompt().Description(value);public static PathPrompt Kind(PathPrompt pathPrompt, PathKind value) #Sets PathPrompt.Kind: What is accepted.
Parameters
- pathPrompt ConsoleMonster.Interactive.PathPrompt
- The instance.
- value ConsoleMonster.Interactive.PathKind
- The value.
Examples
// C# initializer or property // C# fluent
pathPrompt.Kind = value; Ui.PathPrompt().Kind(value);public static PathPrompt MustExist(PathPrompt pathPrompt, bool value) #Sets PathPrompt.MustExist: Whether the path must exist.
Parameters
- pathPrompt ConsoleMonster.Interactive.PathPrompt
- The instance.
- value bool
- The value.
Examples
// C# initializer or property // C# fluent
pathPrompt.MustExist = value; Ui.PathPrompt().MustExist(value);public static PathPrompt MustExist(PathPrompt pathPrompt) #Sets PathPrompt.MustExist to true.
Parameters
- pathPrompt ConsoleMonster.Interactive.PathPrompt
- The instance to configure.
public static PathPrompt ParameterName(PathPrompt pathPrompt, string? value) #Sets Prompt<string>.ParameterName: The parameter that supplies this value non-interactively (-Domain, --domain); named in the non-interactive error message.
Parameters
- pathPrompt ConsoleMonster.Interactive.PathPrompt
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
pathPrompt.ParameterName = value; Ui.PathPrompt().ParameterName(value);public static PathPrompt Suggestions(PathPrompt pathPrompt, int value) #Sets PathPrompt.Suggestions: How many suggestions are listed.
Parameters
- pathPrompt ConsoleMonster.Interactive.PathPrompt
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
pathPrompt.Suggestions = value; Ui.PathPrompt().Suggestions(value);public static PathPrompt Title(PathPrompt pathPrompt, string value) #Sets Prompt<string>.Title: The question.
Parameters
- pathPrompt ConsoleMonster.Interactive.PathPrompt
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
pathPrompt.Title = value; Ui.PathPrompt().Title(value);