|
Argsparse
|
Models a Parser of any context.
More...
Public Member Functions | |
| void | ParseAndRun (IEnumerable< string > args) |
Parses command line-like input from args and then invoke the action provided to the specific parser in Run. | |
| void | Parse (IEnumerable< string > args) |
| Parses command line-like input from args . | |
| void | PrintHelp (TextWriter writer) |
| Prints a formatted help message to the provided output writer with information about parser usage, arguments, options, and subcommand parsers. | |
| void | PrintHelp () |
| Prints a formatted help message to the console with information about parser usage, arguments, options, and subcommand parsers. | |
Properties | |
| HashSet< string > | Names [get] |
| string | Description [get] |
| The parser description as it will appear in help. | |
| string | PlainArgumentsDelimiter [get] |
| ReadOnlyDictionary< string, IParser > | SubParsers [get] |
| Returns a dictionary of all atached subparsers with keys being names of the commands attached to the parsers. | |
Models a Parser of any context.
| void Argparse.IParser.Parse | ( | IEnumerable< string > | args | ) |
Parses command line-like input from args .
| InvalidParserConfigurationException | Thrown when the parser is not configured properly. |
| ParserConversionException | Thrown when the parser fails to convert a value from string to the intended type. |
| ParserRuntimeException | Thrown when the parser fails to run the action associated with an option, flag or argument or a parser. |
Implemented in Argparse.Parser< C >.
| void Argparse.IParser.ParseAndRun | ( | IEnumerable< string > | args | ) |
Parses command line-like input from args and then invoke the action provided to the specific parser in Run.
| InvalidParserConfigurationException | Thrown when the parser is not configured properly. |
| ParserConversionException | Thrown when the parser fails to convert a value from string to the intended type. |
| ParserRuntimeException | Thrown when the parser fails to run the action associated with an option, flag or argument or a parser. |
Implemented in Argparse.Parser< C >.
| void Argparse.IParser.PrintHelp | ( | ) |
Prints a formatted help message to the console with information about parser usage, arguments, options, and subcommand parsers.
Implemented in Argparse.Parser< C >.
| void Argparse.IParser.PrintHelp | ( | TextWriter | writer | ) |
Prints a formatted help message to the provided output writer with information about parser usage, arguments, options, and subcommand parsers.
Implemented in Argparse.Parser< C >.
|
get |
The parser description as it will appear in help.
Implemented in Argparse.Parser< C >.
|
get |
The parser name as it will appear in help and debug messages. The names must not start with "-" or "--". There must be at least one name.
Implemented in Argparse.Parser< C >.
|
get |
Used to configure the arguments delimiter, which when parsed gives signal to the parser to treat all subsequent tokens as plain arguments.
Implemented in Argparse.Parser< C >.
|
get |
Returns a dictionary of all atached subparsers with keys being names of the commands attached to the parsers.
See <see cref="AddSubparser(string, IParser)"
Implemented in Argparse.Parser< C >.