CommandLine
CommandLine copied to clipboard
Add support for configuring parameters
When using parameters, sometimes you would need to tweak them based on some rules.
One example is the use of the output file. The user will provide a value for that, but what happens if the file already exists?
An approach is to automatically append a number to it until it creates a file name that no longer exists.
Other validations could be added -- what if a parameter can have a min/max value? That can be validated by the parser.
Couple of approaches:
- Attributes that describe the behavior
- Callbacks that are registered with the parser for validation