gsscoder/commandline — pull request #4 by gimmemoore (2012-06-08 17:49:22+00:00)
Title: Allow parsing the arguments with differents class options that do not have all the arguments

Hi!

This is Kevin again, here is another pull request that I would like you to include in command line parser. It allows parsing the arguments with different class options that do not have all the arguments defined on the command line arguments.

This allows fragmented arguments class parsing, useful for project with addon where addons also requires command line arguments but when these addons are unknown by the main program at build time and cannot use the same option class.

We have a need for this in our project where external visitors are loaded through unity as extension point and where each of these visitors can have options defined on the command line, but these are unknown at build time by the main Option class of the program. I added a property called IgnoreUnknownArguments in the parser settings (default to false to mimic the original behavior) that allows people to decide to ignore invalid switches on the command line by the parser (as we may now parse the same arguments with multiple options classes.

I also used ReSharper on the CommandLine file to add readonly value and applied some very minor refactoring based on ReSharper comments (1 of the 2 commits)