Skip to content
ConsoleMonster
Class

SecretFieldFluent

ConsoleMonster.Interactive

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

The fluent methods of SecretField, 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
  • SecretFieldFluent

Methods

AddDependsOn 3 overloads
public static SecretField AddDependsOn(SecretField secretField, string item) #

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

Parameters

secretField ConsoleMonster.Interactive.SecretField required
The instance.
item string required
The item.

Returns

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

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

Parameters

secretField ConsoleMonster.Interactive.SecretField required
The instance.
items string[] required
The items, in order.

Returns

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

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

Parameters

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

Returns

SecretField The same instance.
public static SecretField CommandPlaceholder(SecretField secretField, string value) #

Sets SecretField.CommandPlaceholder: What stands in for the secret in the equivalent command (PowerShell: (Read-Host -AsSecureString)).

Parameters

secretField ConsoleMonster.Interactive.SecretField required
The instance.
value string required
The value.

Returns

SecretField The same instance.

Examples

// C# initializer or property              // C# fluent
secretField.CommandPlaceholder = value;    secretField.CommandPlaceholder(value);
public static SecretField Default(SecretField secretField, 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

secretField ConsoleMonster.Interactive.SecretField required
The instance.
value object? required
The value.

Returns

SecretField The same instance.

Examples

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

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

Parameters

secretField ConsoleMonster.Interactive.SecretField required
The instance.
value string? required
The value.

Returns

SecretField The same instance.

Examples

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

Sets Field.Label: The label.

Parameters

secretField ConsoleMonster.Interactive.SecretField required
The instance.
value string required
The value.

Returns

SecretField The same instance.

Examples

// C# initializer or property    // C# fluent
secretField.Label = value;       secretField.Label(value);
public static SecretField MinLength(SecretField secretField, int value) #

Sets SecretField.MinLength: The fewest characters.

Parameters

secretField ConsoleMonster.Interactive.SecretField required
The instance.
value int required
The value.

Returns

SecretField The same instance.

Examples

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

secretField ConsoleMonster.Interactive.SecretField required
The instance.
value string? required
The value.

Returns

SecretField The same instance.

Examples

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

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

Parameters

secretField ConsoleMonster.Interactive.SecretField required
The instance.
value bool required
The value.

Returns

SecretField The same instance.

Examples

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

Sets Field.Remember to true.

Parameters

secretField ConsoleMonster.Interactive.SecretField required
The instance to configure.

Returns

SecretField The same instance.
Required 2 overloads
public static SecretField Required(SecretField secretField, bool value) #

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

Parameters

secretField ConsoleMonster.Interactive.SecretField required
The instance.
value bool required
The value.

Returns

SecretField The same instance.

Examples

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

Sets Field.Required to true.

Parameters

secretField ConsoleMonster.Interactive.SecretField required
The instance to configure.

Returns

SecretField The same instance.
public static SecretField Value(SecretField secretField, object? value) #

Sets Field.Value: The current value.

Parameters

secretField ConsoleMonster.Interactive.SecretField required
The instance.
value object? required
The value.

Returns

SecretField The same instance.

Examples

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