ChoiceFieldFluent
ConsoleMonster.Interactive
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
- The instance.
- item ConsoleMonster.Interactive.Choice
- The item.
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
- The instance.
- items ConsoleMonster.Interactive.Choice[]
- The items, in order.
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
- The instance.
- items System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.Choice>
- The items, in order.
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
- The instance.
- item string
- The item.
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
- The instance.
- items string[]
- The items, in order.
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
- The instance.
- items System.Collections.Generic.IEnumerable<string>
- The items, in order.
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
- The instance.
- value object?
- The value.
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
- The instance.
- value string?
- The value.
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
- The instance.
- value string
- The value.
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
- The instance.
- value int?
- The value.
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
- The instance.
- value int?
- The value.
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
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
choiceField.ParameterName = value; choiceField.ParameterName(value);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
- The instance.
- value bool
- The value.
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
- The instance to configure.
public static ChoiceField Required(ChoiceField choiceField, bool value) #Sets Field.Required: Whether an empty value is refused.
Parameters
- choiceField ConsoleMonster.Interactive.ChoiceField
- The instance.
- value bool
- The value.
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
- The instance to configure.
public static ChoiceField Value(ChoiceField choiceField, object? value) #Sets Field.Value: The current value.
Parameters
- choiceField ConsoleMonster.Interactive.ChoiceField
- The instance.
- value object?
- The value.
Examples
// C# initializer or property // C# fluent
choiceField.Value = value; choiceField.Value(value);