CommandApp<TDefaultCommand> Class

The entry point for a command line application with a default command.
[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<TDefaultCommand> : ICommandApp 
    where TDefaultCommand : class, ICommand
Interfaces

Attributes

RequiresDynamicCodeAttribute

Parameters

TDefaultCommand
The type of the default command.

Constructors

CommandApp(ITypeRegistrar)
Initializes a new instance of the CommandApp<TDefaultCommand> class.

Methods

void Configure(Action<IConfigurator>)
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.
CommandApp<TDefaultCommand> WithData(object)
Sets data that will be passed to the command via the CommandContext.
CommandApp<TDefaultCommand> WithDescription(string)
Sets the description of the default command.