Skip to content
ConsoleMonster
Class

PathPromptFluent

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Modifiers
static
Attributes
GeneratedCode("ConsoleMonster.Generators", "1.0.0")

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 required
The instance.
item string required
The item.

Returns

PathPrompt The same instance.
AddExtensions 2 overloads
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 required
The instance.
items string[] required
The items, in order.

Returns

PathPrompt The same instance.
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 required
The instance.
items System.Collections.Generic.IEnumerable<string> required
The items, in order.

Returns

PathPrompt The same instance.
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 required
The instance.
value string? required
The value.

Returns

PathPrompt The same instance.

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 required
The instance.
value string required
The value.

Returns

PathPrompt The same instance.

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 required
The instance.
value string? required
The value.

Returns

PathPrompt The same instance.

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 required
The instance.
value ConsoleMonster.Interactive.PathKind required
The value.

Returns

PathPrompt The same instance.

Examples

// C# initializer or property    // C# fluent
pathPrompt.Kind = value;         Ui.PathPrompt().Kind(value);
MustExist 2 overloads
public static PathPrompt MustExist(PathPrompt pathPrompt, bool value) #

Sets PathPrompt.MustExist: Whether the path must exist.

Parameters

pathPrompt ConsoleMonster.Interactive.PathPrompt required
The instance.
value bool required
The value.

Returns

PathPrompt The same instance.

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 required
The instance to configure.

Returns

PathPrompt The same instance.
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 required
The instance.
value string? required
The value.

Returns

PathPrompt The same instance.

Examples

// C# initializer or property        // C# fluent
pathPrompt.ParameterName = value;    Ui.PathPrompt().ParameterName(value);
ShowHidden 2 overloads
public static PathPrompt ShowHidden(PathPrompt pathPrompt, bool value) #

Sets PathPrompt.ShowHidden: Whether hidden entries are suggested.

Parameters

pathPrompt ConsoleMonster.Interactive.PathPrompt required
The instance.
value bool required
The value.

Returns

PathPrompt The same instance.

Examples

// C# initializer or property     // C# fluent
pathPrompt.ShowHidden = value;    Ui.PathPrompt().ShowHidden(value);
public static PathPrompt ShowHidden(PathPrompt pathPrompt) #

Sets PathPrompt.ShowHidden to true.

Parameters

pathPrompt ConsoleMonster.Interactive.PathPrompt required
The instance to configure.

Returns

PathPrompt The same instance.
public static PathPrompt Suggestions(PathPrompt pathPrompt, int value) #

Sets PathPrompt.Suggestions: How many suggestions are listed.

Parameters

pathPrompt ConsoleMonster.Interactive.PathPrompt required
The instance.
value int required
The value.

Returns

PathPrompt The same instance.

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 required
The instance.
value string required
The value.

Returns

PathPrompt The same instance.

Examples

// C# initializer or property    // C# fluent
pathPrompt.Title = value;        Ui.PathPrompt().Title(value);