commandlineparser / commandline

The best C# command line parser that brings standardized *nix getopt style, for .NET. Includes F# support
MIT License
4.55k stars 478 forks source link

Mutually exclusive enum values #904

Open johnbocchi opened 11 months ago

johnbocchi commented 11 months ago

Hi, I have 2 options, both required; the first is of type EventType (enum with 3 values: dpo, plms, ts); the second is of type NoticeType (enum with 3 values: Performance, Current, Process). How can I set the Parser so that when I select "dpo" then I can select any value of NoticeType, when I select "plms" then I can select only "Performance" and "Current", and when I select "ts" then I can only select "Process"?

SJFriedl commented 11 months ago

This sounds like you might have to enforce this with actual program code; I haven't used the parameter set stuff, but I'm not sure it's flexible enough to do what you want.