Manual Command Resolution
AutoResolveCommands = false
Manual Command resolution means going low-level, not using the Commander's benefits.
Command auto-resolution is based on Command()]
annotations and Command classes that inherit from CommandBase
. Auto-resolution requires you to use the CLArgs Framework and it requires almost zero code.
Manual resolution requires a Commander instance first. There you can registers verbs-to-functions. When you then call commander.Execute()
it will no longer resolve and look for a Command implementation, it will just search the registered functions.
Please notice, there no Options-to-Parameters conversion. Instead, the registered function receives a CommandLineArguments
object as input. A CommandLineArguments
contains all provided Verbs, Options and Targets from command-line (see Sample2).
RegisterCommand
There is another option how to resolve Commands: Commander.RegisterCommand
. More details to be provided (see also Sample3).
Last updated