Skip to content

Reverse-parsing - generate commandline from arguments #12

@j-maly

Description

@j-maly

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"

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions