Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutually exclusive parameters #23

Closed
christianjunk opened this issue Sep 7, 2015 · 1 comment
Closed

Mutually exclusive parameters #23

christianjunk opened this issue Sep 7, 2015 · 1 comment

Comments

@christianjunk
Copy link

Hi,

is it possible to define mutually exclusive options like the MutuallyExclusiveSet in http://commandline.codeplex.com/)?

I want to define two options for a command which are mutually exclusive.

Much thanks and kind regards,

Christian

@fschwiet
Copy link
Owner

fschwiet commented Sep 7, 2015

No, not directly. You can add parameter validation to the beginning of your Run() override or add an OverrideAfterHandlingArgumentsBeforeRun() override. The parameter validation can throw a ConsoleHelpAsException exception to present the exception message to the user.

@fschwiet fschwiet closed this as completed Sep 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants