commandlineparser / commandlineparser/commandline
Support for arguments that require each other but are optional
- Lingua principale
- C#
- Stelle
- 4.8k
- Fork
- 478
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Similar to the MutuallyExclusiveSet, it would be very helpful to be able to specify that if argument A is specified then argument B is required, but if A is not specified, then B is optional.
This may be a very specific use case, and I wouldn't even pursue it, but I'm having difficulty using the built in HelpWriter when my additional validation fails, since this validation is outside of the normal flow.
An alternative would be to support passing a Function to something like parser.CustomValidation() where the developer could get the parsed options (that were properly parsed) and run additional validation checks. If a check fails the developer can raise an exception.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.