프로퍼티 | 타입 | 설명 | |
---|---|---|---|
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 static RegisterCtrlHandler ( ) : Win32.Handler | ||
리턴 | Win32.Handler |
public WithColor ( ConsoleColor color, System.Action op ) : void | ||
color | ConsoleColor | |
op | System.Action | |
리턴 | void |