Create Commands
Allow to use commands with custom options or no options at all.
Usage
myapp -param1 "something" -Add -A -m "Message"
myapp -Add -A -m "Message"
myapp -Add
Naming
ICommand, ICommand<T> where T : class
Behavior
Unmapped arguments by the ICommand will fall back to the global options if any exist.
Discovery
We can automatically discover the commands or they can be manually added.
- Auto discover if class implements
ICommand
- Manually
parser.ConfigureCommand<ICommand>()
parser.ConfigureCommand<ICommand<Option>>(Expression<Func<Option>>)
Execution
Executing the command can be sync or async
ICommand.Execute()
ICommand.ExecuteAsync()
ICommand<Options>.Execute(Options)
ICommand<Options>.ExecuteAsync(Options)
Progress
Create Commands
Allow to use commands with custom options or no options at all.
Usage
myapp -param1 "something" -Add -A -m "Message"myapp -Add -A -m "Message"myapp -AddNaming
ICommand,ICommand<T> where T : classBehavior
Unmapped arguments by the
ICommandwill fall back to the global options if any exist.Discovery
We can automatically discover the commands or they can be manually added.
ICommandparser.ConfigureCommand<ICommand>()parser.ConfigureCommand<ICommand<Option>>(Expression<Func<Option>>)Execution
Executing the command can be sync or async
ICommand.Execute()ICommand.ExecuteAsync()ICommand<Options>.Execute(Options)ICommand<Options>.ExecuteAsync(Options)Progress