CommandApp Class
The entry point for a command line application.
[RequiresDynamicCode("Spectre.Console.Cli relies on reflection. Use during trimming and AOT compilation is not supported and may result in unexpected behaviors.")]
public sealed class CommandApp : ICommandApp
- Namespace
- Spectre
.Console .Cli - Interfaces
Attributes
-
Requires
Dynamic Code Attribute
Constructors
-
CommandApp
(ITypeRegistrar) -
Initializes a new instance of the
CommandApp
class.
Methods
-
void Configure
(Action < I Configurator> ) - Configures the command line application.
-
int Run
(IEnumerable <string> ) - Runs the command line application with specified arguments.
-
Task<int> RunAsync
(IEnumerable <string> ) - Runs the command line application with specified arguments.
-
DefaultCommandConfigurator SetDefaultCommand
<TCommand> () - Sets the default command.