CommandOptions
ConsoleMonster.Interactive
Configuration for an action whose identity and callback become immutable at Build.
Inheritance
- object
- CommandOptions
Usage
Explore 25 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 11
- Extension method CommandOptions.Configure
- Extension method CommandOptions.ConfirmPrompt
- Extension method CommandOptions.Key
- Extension method CommandOptions.Label
- Extension method CommandOptions.Shortcut
- Method CommandOptionsFluent.Configure
- Method CommandOptionsFluent.ConfirmPrompt
- Method CommandOptionsFluent.Key
- Method CommandOptionsFluent.Label
- Method CommandOptionsFluent.Shortcut
- Method Ui.Command
Accepted by parameters 14
- Extension method CommandOptions.Build
- Extension method CommandOptions.Configure
- Extension method CommandOptions.Configure
- Extension method CommandOptions.ConfirmPrompt
- Extension method CommandOptions.Key
- Extension method CommandOptions.Label
- Extension method CommandOptions.Shortcut
- Method CommandOptionsFluent.Configure
- Method CommandOptionsFluent.Configure
- Method CommandOptionsFluent.ConfirmPrompt
- Method CommandOptionsFluent.Key
- Method CommandOptionsFluent.Label
- Method CommandOptionsFluent.Shortcut
- Method UiConstruction.Build
Constructors
public CommandOptions() #Inherited Methods
Properties
public Func<AppActionContext, CancellationToken, Task>? Action { get; set; } #The asynchronous operation over captured rows and cancellation.
Extension Methods
public static AppCommand Build(CommandOptions options) #Creates an asynchronous action after its immutable identity and callback have been configured.
Parameters
- options ConsoleMonster.Interactive.CommandOptions
- The configured definition.
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);