Skip to content
ConsoleMonster
Class

FieldFluent

ConsoleMonster.Interactive

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

The fluent methods of Field, 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
  • FieldFluent

Methods

AddDependsOn``1 3 overloads
public static TSelf AddDependsOn<TSelf>(TSelf field, string item) #

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

Type Parameters

TSelf

Parameters

field TSelf required
The instance.
item string required
The item.

Returns

TSelf The same instance.
public static TSelf AddDependsOn<TSelf>(TSelf field, params string[] items) #

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

Type Parameters

TSelf

Parameters

field TSelf required
The instance.
items string[] required
The items, in order.

Returns

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

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

Type Parameters

TSelf

Parameters

field TSelf required
The instance.
items System.Collections.Generic.IEnumerable<string> required
The items, in order.

Returns

TSelf The same instance.
public static TSelf Configure<TSelf>(TSelf field, Action<TSelf> configure) #

Assigns callbacks and related configuration without invoking delegate-valued properties.

Type Parameters

TSelf

Parameters

field TSelf required
The instance.
configure System.Action<TSelf> required
Assignments applied in order.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
@field.VisibleWhen = value;      @field.Configure(configured => configured.VisibleWhen = value);
// C# initializer or property    // C# fluent
@field.Validator = value;        @field.Configure(configured => configured.Validator = value);
public static TSelf Default<TSelf>(TSelf field, 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.

Type Parameters

TSelf

Parameters

field TSelf required
The instance.
value object? required
The value.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
@field.Default = value;          @field.Default(value);
public static TSelf Help<TSelf>(TSelf field, string? value) #

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

Type Parameters

TSelf

Parameters

field TSelf required
The instance.
value string? required
The value.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
@field.Help = value;             @field.Help(value);
public static TSelf Label<TSelf>(TSelf field, string value) #

Sets Field.Label: The label.

Type Parameters

TSelf

Parameters

field TSelf required
The instance.
value string required
The value.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
@field.Label = value;            @field.Label(value);
public static TSelf ParameterName<TSelf>(TSelf field, string? value) #

Sets Field.ParameterName: The command-line parameter this field supplies (Domain, -Domain, --domain); null leaves the field out of the equivalent command.

Type Parameters

TSelf

Parameters

field TSelf required
The instance.
value string? required
The value.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
@field.ParameterName = value;    @field.ParameterName(value);
Remember``1 2 overloads
public static TSelf Remember<TSelf>(TSelf field, bool value) #

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

Type Parameters

TSelf

Parameters

field TSelf required
The instance.
value bool required
The value.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
@field.Remember = value;         @field.Remember(value);
public static TSelf Remember<TSelf>(TSelf field) #

Sets Field.Remember to true.

Type Parameters

TSelf

Parameters

field TSelf required
The instance to configure.

Returns

TSelf The same instance.
Required``1 2 overloads
public static TSelf Required<TSelf>(TSelf field, bool value) #

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

Type Parameters

TSelf

Parameters

field TSelf required
The instance.
value bool required
The value.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
@field.Required = value;         @field.Required(value);
public static TSelf Required<TSelf>(TSelf field) #

Sets Field.Required to true.

Type Parameters

TSelf

Parameters

field TSelf required
The instance to configure.

Returns

TSelf The same instance.
public static TSelf Value<TSelf>(TSelf field, object? value) #

Sets Field.Value: The current value.

Type Parameters

TSelf

Parameters

field TSelf required
The instance.
value object? required
The value.

Returns

TSelf The same instance.

Examples

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