Skip to content
ConsoleMonster
Class

ChoiceFieldFluent

ConsoleMonster.Interactive

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

The fluent methods of ChoiceField, 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
  • ChoiceFieldFluent

Methods

public static ChoiceField AddChoice(ChoiceField choiceField, Choice item) #

Adds an item to ChoiceField.Choices: The choices (replaced by the loader's result when one is set).

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
item ConsoleMonster.Interactive.Choice required
The item.

Returns

ChoiceField The same instance.
AddChoices 2 overloads
public static ChoiceField AddChoices(ChoiceField choiceField, params Choice[] items) #

Adds items to ChoiceField.Choices: The choices (replaced by the loader's result when one is set).

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
items ConsoleMonster.Interactive.Choice[] required
The items, in order.

Returns

ChoiceField The same instance.
public static ChoiceField AddChoices(ChoiceField choiceField, IEnumerable<Choice> items) #

Adds items to ChoiceField.Choices: The choices (replaced by the loader's result when one is set).

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.Choice> required
The items, in order.

Returns

ChoiceField The same instance.
AddDependsOn 3 overloads
public static ChoiceField AddDependsOn(ChoiceField choiceField, string item) #

Adds an item to Field.DependsOn: Fields whose change resets this field (and reloads its options).

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
item string required
The item.

Returns

ChoiceField The same instance.
public static ChoiceField AddDependsOn(ChoiceField choiceField, params string[] items) #

Adds items to Field.DependsOn: Fields whose change resets this field (and reloads its options).

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
items string[] required
The items, in order.

Returns

ChoiceField The same instance.
public static ChoiceField AddDependsOn(ChoiceField choiceField, IEnumerable<string> items) #

Adds items to Field.DependsOn: Fields whose change resets this field (and reloads its options).

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
items System.Collections.Generic.IEnumerable<string> required
The items, in order.

Returns

ChoiceField The same instance.
public static ChoiceField Default(ChoiceField choiceField, 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

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
value object? required
The value.

Returns

ChoiceField The same instance.

Examples

// C# initializer or property    // C# fluent
choiceField.Default = value;     choiceField.Default(value);
public static ChoiceField Help(ChoiceField choiceField, string? value) #

Sets Field.Help: Help shown while the field has focus.

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
value string? required
The value.

Returns

ChoiceField The same instance.

Examples

// C# initializer or property    // C# fluent
choiceField.Help = value;        choiceField.Help(value);
public static ChoiceField Label(ChoiceField choiceField, string value) #

Sets Field.Label: The label.

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
value string required
The value.

Returns

ChoiceField The same instance.

Examples

// C# initializer or property    // C# fluent
choiceField.Label = value;       choiceField.Label(value);
public static ChoiceField Maximum(ChoiceField choiceField, int? value) #

Sets ChoiceField.Maximum: The most values (multiple).

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
value int? required
The value.

Returns

ChoiceField The same instance.

Examples

// C# initializer or property    // C# fluent
choiceField.Maximum = value;     choiceField.Maximum(value);
public static ChoiceField Minimum(ChoiceField choiceField, int? value) #

Sets ChoiceField.Minimum: The fewest values (multiple).

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
value int? required
The value.

Returns

ChoiceField The same instance.

Examples

// C# initializer or property    // C# fluent
choiceField.Minimum = value;     choiceField.Minimum(value);
public static ChoiceField ParameterName(ChoiceField choiceField, 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

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
value string? required
The value.

Returns

ChoiceField The same instance.

Examples

// C# initializer or property         // C# fluent
choiceField.ParameterName = value;    choiceField.ParameterName(value);
Remember 2 overloads
public static ChoiceField Remember(ChoiceField choiceField, bool value) #

Sets Field.Remember: Whether the value is kept in presets and remembered choices (never for secrets).

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
value bool required
The value.

Returns

ChoiceField The same instance.

Examples

// C# initializer or property    // C# fluent
choiceField.Remember = value;    choiceField.Remember(value);
public static ChoiceField Remember(ChoiceField choiceField) #

Sets Field.Remember to true.

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance to configure.

Returns

ChoiceField The same instance.
Required 2 overloads
public static ChoiceField Required(ChoiceField choiceField, bool value) #

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

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
value bool required
The value.

Returns

ChoiceField The same instance.

Examples

// C# initializer or property    // C# fluent
choiceField.Required = value;    choiceField.Required(value);
public static ChoiceField Required(ChoiceField choiceField) #

Sets Field.Required to true.

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance to configure.

Returns

ChoiceField The same instance.
public static ChoiceField Value(ChoiceField choiceField, object? value) #

Sets Field.Value: The current value.

Parameters

choiceField ConsoleMonster.Interactive.ChoiceField required
The instance.
value object? required
The value.

Returns

ChoiceField The same instance.

Examples

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