PathField
ConsoleMonster.Interactive
A file or folder path with completion.
Inheritance
- Field
- PathField
Usage
Explore 58 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 30
- Method Form.Path
- Method FormPage.Path
- Extension method PathField.Default
- Extension method PathField.DependsOn
- Extension method PathField.Extension
- Extension method PathField.Extensions
- Extension method PathField.Help
- Extension method PathField.Label
- Extension method PathField.MustExist
- Extension method PathField.ParameterName
- Extension method PathField.PathKind
- Extension method PathField.Remember
- Extension method PathField.Required
- Extension method PathField.ShowWhen
- Extension method PathField.Validate
- Extension method PathField.Value
- Method PathFieldFluent.Default
- Method PathFieldFluent.DependsOn
- Method PathFieldFluent.Extension
- Method PathFieldFluent.Extensions
- Method PathFieldFluent.Help
- Method PathFieldFluent.Label
- Method PathFieldFluent.MustExist
- Method PathFieldFluent.ParameterName
- Method PathFieldFluent.PathKind
- Method PathFieldFluent.Remember
- Method PathFieldFluent.Required
- Method PathFieldFluent.ShowWhen
- Method PathFieldFluent.Validate
- Method PathFieldFluent.Value
Accepted by parameters 28
- Extension method PathField.Default
- Extension method PathField.DependsOn
- Extension method PathField.Extension
- Extension method PathField.Extensions
- Extension method PathField.Help
- Extension method PathField.Label
- Extension method PathField.MustExist
- Extension method PathField.ParameterName
- Extension method PathField.PathKind
- Extension method PathField.Remember
- Extension method PathField.Required
- Extension method PathField.ShowWhen
- Extension method PathField.Validate
- Extension method PathField.Value
- Method PathFieldFluent.Default
- Method PathFieldFluent.DependsOn
- Method PathFieldFluent.Extension
- Method PathFieldFluent.Extensions
- Method PathFieldFluent.Help
- Method PathFieldFluent.Label
- Method PathFieldFluent.MustExist
- Method PathFieldFluent.ParameterName
- Method PathFieldFluent.PathKind
- Method PathFieldFluent.Remember
- Method PathFieldFluent.Required
- Method PathFieldFluent.ShowWhen
- Method PathFieldFluent.Validate
- Method PathFieldFluent.Value
Constructors
public PathField(string key, string? label = null) #Creates a path field.
Parameters
- key string
- The key.
- label string? = null
- The label.
Inherited Methods
Properties
Inherited Properties
Extension Methods
public static PathField Default(PathField pathField, object? value) #Sets Field.Default: The declared default: the starting value until a value is set, and values equal to it are left out of the equivalent command.
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- value object?
- The value.
Examples
// C# initializer or property // C# fluent
pathField.Default = value; pathField.Default(value);public static PathField DependsOn(PathField pathField, string item) #Adds an item to Field.DependsOn: Fields whose change resets this field (and reloads its options).
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- item string
- The item.
public static PathField DependsOn(PathField pathField, IEnumerable<string> items) #Adds items to Field.DependsOn: Fields whose change resets this field (and reloads its options).
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static PathField Extension(PathField pathField, string item) #Adds an item to PathField.Extensions: Extensions offered as suggestions.
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- item string
- The item.
public static PathField Extensions(PathField pathField, IEnumerable<string> items) #Adds items to PathField.Extensions: Extensions offered as suggestions.
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static PathField Help(PathField pathField, string? value) #Sets Field.Help: Help shown while the field has focus.
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
pathField.Help = value; pathField.Help(value);public static PathField Label(PathField pathField, string value) #Sets Field.Label: The label.
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
pathField.Label = value; pathField.Label(value);public static PathField MustExist(PathField pathField, bool value = true) #Sets PathField.MustExist: Whether the path must exist.
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
pathField.MustExist = value; pathField.MustExist(value);public static PathField ParameterName(PathField pathField, string? value) #Sets Field.ParameterName: The command-line parameter this field supplies (Domain, -Domain, --domain); null leaves the field out of the equivalent command.
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
pathField.ParameterName = value; pathField.ParameterName(value);public static PathField PathKind(PathField pathField, PathKind value) #Sets PathField.PathKind: What is accepted.
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- value ConsoleMonster.Interactive.PathKind
- The value.
Examples
// C# initializer or property // C# fluent
pathField.PathKind = value; pathField.PathKind(value);public static PathField Remember(PathField pathField, bool value = true) #Sets Field.Remember: Whether the value is kept in presets and remembered choices (never for secrets).
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
pathField.Remember = value; pathField.Remember(value);public static PathField Required(PathField pathField, bool value = true) #Sets Field.Required: Whether an empty value is refused.
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
pathField.Required = value; pathField.Required(value);public static PathField ShowWhen(PathField pathField, Func<FormValues, bool>? value) #Sets Field.VisibleWhen: Shows the field only while this returns true.
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- value System.Func<ConsoleMonster.Interactive.FormValues, bool>?
- The callback.
Examples
// C# initializer or property // C# fluent
pathField.VisibleWhen = value; pathField.ShowWhen(value);public static PathField Validate(PathField pathField, Func<object?, FormValues, string?>? value) #Sets Field.Validator: A validator: returns an error message, or null when the value is fine.
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- value System.Func<object?, ConsoleMonster.Interactive.FormValues, string?>?
- The callback.
Examples
// C# initializer or property // C# fluent
pathField.Validator = value; pathField.Validate(value);public static PathField Value(PathField pathField, object? value) #Sets Field.Value: The current value.
Parameters
- pathField ConsoleMonster.Interactive.PathField
- The instance.
- value object?
- The value.
Examples
// C# initializer or property // C# fluent
pathField.Value = value; pathField.Value(value);