CommandLineParser icon indicating copy to clipboard operation
CommandLineParser copied to clipboard

Reverse-parsing - generate commandline from arguments

Open j-maly opened this issue 8 years ago • 0 comments

CommandLineParser.CommandLineParser parser = new CommandLineParser.CommandLineParser(); MyCommandLineOption options = new MyCommandLineOption(); parser.ExtractArgumentAttributes(options); parser.ParseCommandLine(args);

It would be helpfull if its possible to do this reverse for generating a command string:

MyCommandLineOption options = new MyCommandLineOption(); option.p1 = "Yes we can"; option.p2 = true; String cmd = option.ToParameterString(); // cmd should be: "-p1 Yes we can -p2"

j-maly avatar Feb 21 '16 21:02 j-maly