|
virtual string[] | GenerateHelpHead< T > (ParserOptions parserOptions) |
| Generates the help header from attributes or defaults to something legible including the current app file.
|
virtual string[] | GenerateArgumentHelp< T > (CommandlineArgument[] options) |
| Generates the help for the arguments section.
|
virtual string | FormatDescriptionText (string description, bool isFlag, object defaultValue, string envVarForDefault, bool isHelpFlag) |
| Formats the description text for an argument to make it "fit on the right".
|
virtual string | TypeAnnotationFor (string type, bool isFlag) |
| Produces a formatted type annotation for an argument.
|
string | FormatOptionHelp (string shortName, string longName, string type, bool isFlag, string helpText, int leftColWidth, int maxLineWidth) |
| Formats the help entry for an option.
|
string | FormatArg (string name, int dashes, bool isFirst) |
| Formats the argument part of argument help (eg '-h, –help') Should be called twice per argument, with a flag as to whether it's the first call (for the short part) or the second (for the long part)
|
virtual string[] | GenerateHelpFooter< T > (ParserOptions parserOptions) |
| Generates the help footer from a [MoreInfo] attribute.
|
string[] | ReadTextAttributes< THost, TAttribute > () |
| Reads all values from text-based attributes of type TAttribute which decorate THost.
|
|
Action< string > | LineWriter = Console.WriteLine [get, set] |
| Writes a line to the output (default is Console.WriteLine)
|
Action< int > | ExitAction = Environment.Exit [get, set] |
| Used to exit the app when necessary (default Environment.Exit)
|
bool | ExitWhenShowingHelp = true [get, set] |
| (flag) exit when showing help? default true
|
bool | ShowedHelp = false [get, set] |
| (flag) did we show help? useful if you choose not to exit when showing help
|
bool | ExitOnError = true [get, set] |
| (flag) should we exit when args have an error? default true
|
bool | IgnoreUnknownSwitches [get, set] |
| (flag) ignore unknown switches - only include them in the collected
|
bool | EnableExtendedParsing = true [get, set] |
| When enabled, some condensed versions of argument handling are enabled, including running together short flag arguments, eg -n -a -b => -nab specifying numeric values without spaces, eg -l 1234 => -l1234.
|
int | ConsoleColumns [get, set] |
| When unable to determine the number of columns available to the console, fall back on this value.
|
virtual string | NegateMessage [get] |
| Message to display about the auto –no-{arg} functionality for flags.
|
virtual int | ConsoleWidth [get] |
| Provides the window width for the console (falling back on the value of ConsoleColumns (default: 100) when that fails)
|
string[] | Description [get, set] |
| Override any overall help description.
|
string[] | MoreInfo [get, set] |
| Provide the help footer via parser argument rather than from the decorated [MoreInfo].
|
bool | IncludeDefaultDescription [get, set] |
| When specifying a description for your options, whether or not the default {programname.exe} {args} should be included.
|
bool | ShowHelpOnArgumentError [get, set] |
| Automatically show help text on argument error.
|
bool | FallbackOnEnvironmentVariables [get, set] |
| When enabled, environment variables will be observed as fallback values for arguments. For example, if you have a RemoteHost property, then any of the following environment variables should configure it if it is not explicitly set from the commandline: REMOTEHOST REMOTE_HOST ReMOteHosT.
|
Provides options for the parser.