CommandLineParser
CommandLineParser copied to clipboard
Reverse-parsing - generate commandline from arguments
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"