CliParser.Run Method
Definition
- Namespace
- DotMake.CommandLine
- Assembly
- DotMake.CommandLine.dll
Run(string[])
Parses a command line string array and runs the handler for the indicated command.
public int Run(string[] args = null)
Parameters
argsstring[]The string array typically passed to a program. This is usually the special variable
argsavailable inProgram.cs(new style with top-level statements) or the string array passed to the program'sMainmethod (old style). If not specified or null,argswill be retrieved automatically from the current process via DotMake.CommandLine.CliParser.GetArgs().
Returns
- int
The exit code for the invocation.
Run(string)
Parses a command line string value and runs the handler for the indicated command.
public int Run(string commandLine)
Parameters
commandLinestringThe command line string that will be split into tokens as if it had been passed on the command line. Useful for testing command line input by just specifying it as a single string.
Returns
- int
The exit code for the invocation.