TextFieldFluent
ConsoleMonster.Interactive
The fluent methods of TextField, 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
- TextFieldFluent
Methods
public static TextField AddDependsOn(TextField textField, string item) #Adds an item to Field.DependsOn: Fields whose change resets this field (and reloads its options).
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance.
- item string
- The item.
public static TextField AddDependsOn(TextField textField, params string[] items) #Adds items to Field.DependsOn: Fields whose change resets this field (and reloads its options).
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance.
- items string[]
- The items, in order.
public static TextField AddDependsOn(TextField textField, IEnumerable<string> items) #Adds items to Field.DependsOn: Fields whose change resets this field (and reloads its options).
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
public static TextField Default(TextField textField, 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
- textField ConsoleMonster.Interactive.TextField
- The instance.
- value object?
- The value.
Examples
// C# initializer or property // C# fluent
textField.Default = value; textField.Default(value);public static TextField Help(TextField textField, string? value) #Sets Field.Help: Help shown while the field has focus.
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
textField.Help = value; textField.Help(value);public static TextField Label(TextField textField, string value) #Sets Field.Label: The label.
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
textField.Label = value; textField.Label(value);public static TextField MaxLength(TextField textField, int value) #Sets TextField.MaxLength: The most characters.
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
textField.MaxLength = value; textField.MaxLength(value);public static TextField MinLength(TextField textField, int value) #Sets TextField.MinLength: The fewest characters.
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
textField.MinLength = value; textField.MinLength(value);public static TextField ParameterName(TextField textField, 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
- textField ConsoleMonster.Interactive.TextField
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
textField.ParameterName = value; textField.ParameterName(value);public static TextField Pattern(TextField textField, string? value) #Sets TextField.Pattern: A pattern the whole value must match.
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
textField.Pattern = value; textField.Pattern(value);public static TextField PatternMessage(TextField textField, string? value) #Sets TextField.PatternMessage: The message when the pattern does not match.
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
textField.PatternMessage = value; textField.PatternMessage(value);public static TextField Placeholder(TextField textField, string? value) #Sets TextField.Placeholder: Muted text while empty.
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
textField.Placeholder = value; textField.Placeholder(value);public static TextField Remember(TextField textField, bool value) #Sets Field.Remember: Whether the value is kept in presets and remembered choices (never for secrets).
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance.
- value bool
- The value.
Examples
// C# initializer or property // C# fluent
textField.Remember = value; textField.Remember(value);public static TextField Remember(TextField textField) #Sets Field.Remember to true.
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance to configure.
public static TextField Required(TextField textField, bool value) #Sets Field.Required: Whether an empty value is refused.
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance.
- value bool
- The value.
Examples
// C# initializer or property // C# fluent
textField.Required = value; textField.Required(value);public static TextField Required(TextField textField) #Sets Field.Required to true.
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance to configure.
public static TextField Value(TextField textField, object? value) #Sets Field.Value: The current value.
Parameters
- textField ConsoleMonster.Interactive.TextField
- The instance.
- value object?
- The value.
Examples
// C# initializer or property // C# fluent
textField.Value = value; textField.Value(value);