![]() |
virtualSoC
0.6.2
baskett
|
Class for defining, validating and processing command line arguments. More...
Public Member Functions | |
| CommandLineArgs () | |
| Initializes a new instance of the CommandLineArgs class. More... | |
| void | AddExample (string description, string commandLine) |
| Adds an example that will be displayed on the help page. More... | |
| T | GetValue< T > (string name) |
| Gets the value of an argument. More... | |
| void | PrintHelp (string errorMessage=null) |
| Prints a help message describing the effects of all available options. More... | |
| void | Process () |
| Processes all registered arguments that have their Argument.Processor set. More... | |
| void | RegisterAlias (string originalName, string alias) |
| Registers an alias for an existing entry. More... | |
| void | RegisterArgument (string name, Argument arg) |
| Registers a new argument. More... | |
| void | RegisterHelpArgument (string name="help") |
| Registers a help argument that will display the help page for the program if set by the user. More... | |
| void | SetDefaultArgument (string argument) |
| Sets the default argument that will be filled when no argument name is given. More... | |
| bool | Validate (string[] args, OptionalOut< string[]> outErrors=null) |
| Processes a set of command line arguments. More... | |
| bool | Validate (string args, OptionalOut< string[]> outErrors=null) |
| Processes a set of command line arguments. More... | |
| CommandLineArgs () | |
| Initializes a new instance of the CommandLineArgs class. More... | |
| void | AddExample (string description, string commandLine) |
| Adds an example that will be displayed on the help page. More... | |
| T | GetValue< T > (string name) |
| Gets the value of an argument. More... | |
| void | PrintHelp (string errorMessage=null) |
| Prints a help message describing the effects of all available options. More... | |
| void | Process () |
| Processes all registered arguments that have their Argument.Processor set. More... | |
| void | RegisterAlias (string originalName, string alias) |
| Registers an alias for an existing entry. More... | |
| void | RegisterArgument (string name, Argument arg) |
| Registers a new argument. More... | |
| void | RegisterHelpArgument (string name="help") |
| Registers a help argument that will display the help page for the program if set by the user. More... | |
| void | SetDefaultArgument (string argument) |
| Sets the default argument that will be filled when no argument name is given. More... | |
| bool | Validate (string[] args, OptionalOut< string[]> outErrors=null) |
| Processes a set of command line arguments. More... | |
| bool | Validate (string args, OptionalOut< string[]> outErrors=null) |
| Processes a set of command line arguments. More... | |
| CommandLineArgs () | |
| Initializes a new instance of the CommandLineArgs class. More... | |
| void | AddExample (string description, string commandLine) |
| Adds an example that will be displayed on the help page. More... | |
| T | GetValue< T > (string name) |
| Gets the value of an argument. More... | |
| void | PrintHelp (string errorMessage=null) |
| Prints a help message describing the effects of all available options. More... | |
| void | Process () |
| Processes all registered arguments that have their Argument.Processor set. More... | |
| void | RegisterAlias (string originalName, string alias) |
| Registers an alias for an existing entry. More... | |
| void | RegisterArgument (string name, Argument arg) |
| Registers a new argument. More... | |
| void | RegisterHelpArgument (string name="help") |
| Registers a help argument that will display the help page for the program if set by the user. More... | |
| void | SetDefaultArgument (string argument) |
| Sets the default argument that will be filled when no argument name is given. More... | |
| bool | Validate (string[] args, OptionalOut< string[]> outErrors=null) |
| Processes a set of command line arguments. More... | |
| bool | Validate (string args, OptionalOut< string[]> outErrors=null) |
| Processes a set of command line arguments. More... | |
Properties | |
| string | ApplicationInfo [get, set] |
| Information about the application that will be displayed in the usage page. More... | |
| string | ExecuteableName [get, set] |
| Name of the executeable that will be displayed in the usage page. More... | |
| TextWriter | OutputWriter [get, set] |
| The TextWriter that is used to write the output. The default value is to use Console.Out More... | |
Class for defining, validating and processing command line arguments.
| DotArgs.CommandLineArgs.CommandLineArgs | ( | ) |
Initializes a new instance of the CommandLineArgs class.
| DotArgs.CommandLineArgs.CommandLineArgs | ( | ) |
Initializes a new instance of the CommandLineArgs class.
| DotArgs.CommandLineArgs.CommandLineArgs | ( | ) |
Initializes a new instance of the CommandLineArgs class.
| void DotArgs.CommandLineArgs.AddExample | ( | string | description, |
| string | commandLine | ||
| ) |
| void DotArgs.CommandLineArgs.AddExample | ( | string | description, |
| string | commandLine | ||
| ) |
| void DotArgs.CommandLineArgs.AddExample | ( | string | description, |
| string | commandLine | ||
| ) |
| T DotArgs.CommandLineArgs.GetValue< T > | ( | string | name | ) |
Gets the value of an argument.
| name | Name of the argument to read. |
| System.Collections.Generic.KeyNotFoundException | An argument with the name name was not registered. |
| T DotArgs.CommandLineArgs.GetValue< T > | ( | string | name | ) |
Gets the value of an argument.
| name | Name of the argument to read. |
| System.Collections.Generic.KeyNotFoundException | An argument with the name name was not registered. |
| T DotArgs.CommandLineArgs.GetValue< T > | ( | string | name | ) |
Gets the value of an argument.
| name | Name of the argument to read. |
| System.Collections.Generic.KeyNotFoundException | An argument with the name name was not registered. |
| void DotArgs.CommandLineArgs.PrintHelp | ( | string | errorMessage = null | ) |
Prints a help message describing the effects of all available options.
| errorMessage | Optional error message to display. |
| void DotArgs.CommandLineArgs.PrintHelp | ( | string | errorMessage = null | ) |
Prints a help message describing the effects of all available options.
| errorMessage | Optional error message to display. |
| void DotArgs.CommandLineArgs.PrintHelp | ( | string | errorMessage = null | ) |
Prints a help message describing the effects of all available options.
| errorMessage | Optional error message to display. |
| void DotArgs.CommandLineArgs.Process | ( | ) |
Processes all registered arguments that have their Argument.Processor set.
| void DotArgs.CommandLineArgs.Process | ( | ) |
Processes all registered arguments that have their Argument.Processor set.
| void DotArgs.CommandLineArgs.Process | ( | ) |
Processes all registered arguments that have their Argument.Processor set.
| void DotArgs.CommandLineArgs.RegisterAlias | ( | string | originalName, |
| string | alias | ||
| ) |
Registers an alias for an existing entry.
| originalName | Name of the original option. |
| alias | The alias to add for the option. |
| System.Collections.Generic.KeyNotFoundException | An entry with the name originalName was not registered. |
| void DotArgs.CommandLineArgs.RegisterAlias | ( | string | originalName, |
| string | alias | ||
| ) |
Registers an alias for an existing entry.
| originalName | Name of the original option. |
| alias | The alias to add for the option. |
| System.Collections.Generic.KeyNotFoundException | An entry with the name originalName was not registered. |
| void DotArgs.CommandLineArgs.RegisterAlias | ( | string | originalName, |
| string | alias | ||
| ) |
Registers an alias for an existing entry.
| originalName | Name of the original option. |
| alias | The alias to add for the option. |
| System.Collections.Generic.KeyNotFoundException | An entry with the name originalName was not registered. |
| void DotArgs.CommandLineArgs.RegisterArgument | ( | string | name, |
| Argument | arg | ||
| ) |
| void DotArgs.CommandLineArgs.RegisterArgument | ( | string | name, |
| Argument | arg | ||
| ) |
| void DotArgs.CommandLineArgs.RegisterArgument | ( | string | name, |
| Argument | arg | ||
| ) |
| void DotArgs.CommandLineArgs.RegisterHelpArgument | ( | string | name = "help" | ) |
Registers a help argument that will display the help page for the program if set by the user.
| name | Name of the flag. The default value is "help". |
| void DotArgs.CommandLineArgs.RegisterHelpArgument | ( | string | name = "help" | ) |
Registers a help argument that will display the help page for the program if set by the user.
| name | Name of the flag. The default value is "help". |
| void DotArgs.CommandLineArgs.RegisterHelpArgument | ( | string | name = "help" | ) |
Registers a help argument that will display the help page for the program if set by the user.
| name | Name of the flag. The default value is "help". |
| void DotArgs.CommandLineArgs.SetDefaultArgument | ( | string | argument | ) |
Sets the default argument that will be filled when no argument name is given.
| argument | Name of the argument to use as the default. |
| void DotArgs.CommandLineArgs.SetDefaultArgument | ( | string | argument | ) |
Sets the default argument that will be filled when no argument name is given.
| argument | Name of the argument to use as the default. |
| void DotArgs.CommandLineArgs.SetDefaultArgument | ( | string | argument | ) |
Sets the default argument that will be filled when no argument name is given.
| argument | Name of the argument to use as the default. |
| bool DotArgs.CommandLineArgs.Validate | ( | string [] | args, |
| OptionalOut< string[]> | outErrors = null |
||
| ) |
Processes a set of command line arguments.
| args | Command line arguments to process. This is usally coming from your Main method. |
| outErrors | Optional "out" parameter that holds error strings for every encountered error. |
true if the arguments in args are valid; otherwise false . | bool DotArgs.CommandLineArgs.Validate | ( | string [] | args, |
| OptionalOut< string[]> | outErrors = null |
||
| ) |
Processes a set of command line arguments.
| args | Command line arguments to process. This is usally coming from your Main method. |
| outErrors | Optional "out" parameter that holds error strings for every encountered error. |
true if the arguments in args are valid; otherwise false . | bool DotArgs.CommandLineArgs.Validate | ( | string [] | args, |
| OptionalOut< string[]> | outErrors = null |
||
| ) |
Processes a set of command line arguments.
| args | Command line arguments to process. This is usally coming from your Main method. |
| outErrors | Optional "out" parameter that holds error strings for every encountered error. |
true if the arguments in args are valid; otherwise false . | bool DotArgs.CommandLineArgs.Validate | ( | string | args, |
| OptionalOut< string[]> | outErrors = null |
||
| ) |
Processes a set of command line arguments.
| args | Command line arguments to process. This is usally coming from your Main method. |
| outErrors | Optional "out" parameter that holds error strings for every encountered error. |
true if the arguments in args are valid; otherwise false . | bool DotArgs.CommandLineArgs.Validate | ( | string | args, |
| OptionalOut< string[]> | outErrors = null |
||
| ) |
Processes a set of command line arguments.
| args | Command line arguments to process. This is usally coming from your Main method. |
| outErrors | Optional "out" parameter that holds error strings for every encountered error. |
true if the arguments in args are valid; otherwise false . | bool DotArgs.CommandLineArgs.Validate | ( | string | args, |
| OptionalOut< string[]> | outErrors = null |
||
| ) |
Processes a set of command line arguments.
| args | Command line arguments to process. This is usally coming from your Main method. |
| outErrors | Optional "out" parameter that holds error strings for every encountered error. |
true if the arguments in args are valid; otherwise false .
|
getset |
Information about the application that will be displayed in the usage page.
MyCoolProgram v1.2 Copyright (C) John Smith <smith@example.com>
|
getset |
Name of the executeable that will be displayed in the usage page.
The default value for this is the name of the assembly containing the code that created this object.
|
getset |
The TextWriter that is used to write the output. The default value is to use Console.Out