Свойство | Тип | Описание | |
---|---|---|---|
Definition | |||
Interrupted | bool | ||
IsRedirected | bool |
Свойство | Тип | Описание | |
---|---|---|---|
_log | log4net.ILog |
Метод | Описание | |
---|---|---|
AddFlagArgument ( string key, string desc ) : FlagArgument |
Convenience method for defining a new flag argument.
|
|
AddFlagArgument ( string key, string desc, |
Convenience method for defining a new flag argument.
|
|
AddKeywordArgument ( string key, string desc ) : KeywordArgument |
Convenience method for defining a new keyword argument.
|
|
AddKeywordArgument ( string key, string desc, |
Convenience method for defining a new keyword argument.
|
|
AddPositionalArgument ( string key, string desc ) : |
Convenience method for defining a new positional argument.
|
|
AddPositionalArgument ( string key, string desc, |
Convenience method for defining a new positional argument.
|
|
ClassifyArguments ( IEnumerable |
Classifies the supplied list of arguments, returning a count of the number of positional arguments found.
|
|
ClearArguments ( ) : void |
Clear existing arguments from the definition.
|
|
ClearLine ( ) : void |
Clears the last text written to the console using Write. Note that this may be more than a single line of text, if the window width is less than the length of the string written.
|
|
DisplayTitle ( |
Displays the application title, version etc.
|
|
DisplayUsage ( |
Displays a usgae message, based on the allowed arguments and purpose represented by this class.
|
|
Parse ( IEnumerable |
Parses the supplied set of arg strings using the list of Argument definitions maintained by this command-line UI instance.
|
|
ReadLine ( string prompt ) : string |
For completeness - read a line of input from the console.
|
|
ReadPassword ( string prompt ) : string |
Reads a password from the command-line, echoing * for each keypress.
|
|
RegisterCtrlHandler ( ) : Win32.Handler |
This method registers this class as a handler for Ctrl-C etc events in the console. It returns a handle to the handler, which should be referenced via the following at the end of the program Main method: GC.KeepAlive(hr);
|
|
UI ( string help ) : System |
Constructor; requires a purpose for the program whose args we are parsing.
|
|
WithColor ( ConsoleColor color, System.Action op ) : void |
Performs the specified operation +op+ with the console color temporarily changed to +color+. On completion of the operation, the color is reset to the original color.
|
|
Write ( string line ) : void |
Writes a partial line of text to the console, without moving to the next line.
|
|
WriteLine ( ) : void |
Writes a blank line to the console.
|
|
WriteLine ( string text ) : void |
Writes a line of text to the console, ensuring lines the same width as the console don't output an unnecessary new-line.
|
Метод | Описание | |
---|---|---|
OutputArg ( |
Метод | Описание | |
---|---|---|
CtrlHandler ( EInterruptTypes ctrlType ) : bool |
Handler to receive control events, such as Ctrl-C and logoff and shutdown events. As a minimum, this logs the event, so that a record of why the process exited is maintained.
|
public AddFlagArgument ( string key, string desc ) : FlagArgument | ||
key | string | |
desc | string | |
Результат | FlagArgument |
public AddFlagArgument ( string key, string desc, |
||
key | string | |
desc | string | |
onParse | ||
Результат | FlagArgument |
public AddKeywordArgument ( string key, string desc ) : KeywordArgument | ||
key | string | |
desc | string | |
Результат | KeywordArgument |
public AddKeywordArgument ( string key, string desc, |
||
key | string | |
desc | string | |
onParse | ||
Результат | KeywordArgument |
public AddPositionalArgument ( string key, string desc ) : |
||
key | string | |
desc | string | |
Результат |
public AddPositionalArgument ( string key, string desc, |
||
key | string | |
desc | string | |
onParse | ||
Результат |
public ClassifyArguments ( IEnumerable |
||
args | IEnumerable |
|
Результат | int |
public DisplayTitle ( |
||
console | ||
Результат | void |
public DisplayUsage ( |
||
console | ||
args | object>.Dictionary | |
Результат | void |
protected OutputArg ( |
||
arg | ||
console | ||
Результат | void |
public Parse ( IEnumerable |
||
args | IEnumerable |
|
Результат | object>.Dictionary |
public ReadLine ( string prompt ) : string | ||
prompt | string | |
Результат | string |
public ReadPassword ( string prompt ) : string | ||
prompt | string | |
Результат | string |
public static RegisterCtrlHandler ( ) : Win32.Handler | ||
Результат | Win32.Handler |
public WithColor ( ConsoleColor color, System.Action op ) : void | ||
color | ConsoleColor | |
op | System.Action | |
Результат | void |