Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse-parsing - generate commandline from arguments #12

Open
j-maly opened this issue Feb 21, 2016 · 0 comments
Open

Reverse-parsing - generate commandline from arguments #12

j-maly opened this issue Feb 21, 2016 · 0 comments

Comments

@j-maly
Copy link
Owner

j-maly commented Feb 21, 2016

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant