Skip to content
ConsoleMonster
Class

TextFieldFluent

ConsoleMonster.Interactive

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

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

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

Returns

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

Returns

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

Returns

TextField The same instance.
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 required
The instance.
value object? required
The value.

Returns

TextField The same instance.

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

Returns

TextField The same instance.

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

Returns

TextField The same instance.

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

Returns

TextField The same instance.

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

Returns

TextField The same instance.

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

Returns

TextField The same instance.

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

Returns

TextField The same instance.

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

Returns

TextField The same instance.

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

Returns

TextField The same instance.

Examples

// C# initializer or property     // C# fluent
textField.Placeholder = value;    textField.Placeholder(value);
Remember 2 overloads
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 required
The instance.
value bool required
The value.

Returns

TextField The same instance.

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

Returns

TextField The same instance.
Required 2 overloads
public static TextField Required(TextField textField, bool value) #

Sets Field.Required: Whether an empty value is refused.

Parameters

textField ConsoleMonster.Interactive.TextField required
The instance.
value bool required
The value.

Returns

TextField The same instance.

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

Returns

TextField The same instance.
public static TextField Value(TextField textField, object? value) #

Sets Field.Value: The current value.

Parameters

textField ConsoleMonster.Interactive.TextField required
The instance.
value object? required
The value.

Returns

TextField The same instance.

Examples

// C# initializer or property    // C# fluent
textField.Value = value;         textField.Value(value);