Class
CommandOptionsFluent
ConsoleMonster.Interactive
The fluent methods of CommandOptions, 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
- CommandOptionsFluent
Methods
public static CommandOptions Configure(CommandOptions commandOptions, Action<CommandOptions> configure) #Assigns callbacks and related configuration without invoking delegate-valued properties.
Parameters
- commandOptions ConsoleMonster.Interactive.CommandOptions
- The instance.
- configure System.Action<ConsoleMonster.Interactive.CommandOptions>
- Assignments applied in order.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.CommandOptions { Action = value }; Ui.Command().Configure(configured => configured.Action = value);public static CommandOptions ConfirmPrompt(CommandOptions commandOptions, string? value) #Sets CommandOptions.ConfirmPrompt: The optional confirmation prompt.
Parameters
- commandOptions ConsoleMonster.Interactive.CommandOptions
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.CommandOptions { ConfirmPrompt = value }; Ui.Command().ConfirmPrompt(value);public static CommandOptions Key(CommandOptions commandOptions, string value) #Sets CommandOptions.Key: The stable command key.
Parameters
- commandOptions ConsoleMonster.Interactive.CommandOptions
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.CommandOptions { Key = value }; Ui.Command().Key(value);public static CommandOptions Label(CommandOptions commandOptions, string? value) #Sets CommandOptions.Label: The visible label; null uses Key.
Parameters
- commandOptions ConsoleMonster.Interactive.CommandOptions
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.CommandOptions { Label = value }; Ui.Command().Label(value);public static CommandOptions Shortcut(CommandOptions commandOptions, KeyChord? value) #Sets CommandOptions.Shortcut: The optional keyboard shortcut.
Parameters
- commandOptions ConsoleMonster.Interactive.CommandOptions
- The instance.
- value ConsoleMonster.Input.KeyChord?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.CommandOptions { Shortcut = value }; Ui.Command().Shortcut(value);