Using Command Line Parser Library, is there a way to mark a set of say 3 options and make exactly one of the three options required?
So having these options:
[Option("list-plugins", MutuallyExclusiveSet = "Commands")]
public bool ListPLugins { get; set; }
[Option("list-languages", MutuallyExclusiveSet = "Commands")]
public bool ListLanguages { get; set; }
[OptionList('f', "files", ',', MutuallyExclusiveSet = "Commands")]
public IList<string> Files { get; set; }
I'd like the user to only be able to use exactly one at a time.
I.E. valid calls would include calls with exactly one of the options:
"MyProgram --files a.txt"
, "MyProgram --list-languages"
and "MyProgram --list-plugins"
while calls without or with multiples of the options:
"MyProgram"
(this case is my problem), "MyProgram --files a.txt --list-languages"
and "MyProgram --list-languages --list-plugins"
would be invalid.