C# Класс FdoToolbox.Core.AppFramework.ConsoleApplication

Base application object for console applications
Наследование: IDisposable
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_Command IConsoleCommand

Открытые методы

Метод Описание
Ask ( string question ) : bool

Asks the specified question.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ParseArguments ( string args ) : void

Parse application-specific arguments.

Run ( string args ) : void

Run the application

ShowUsage ( ) : void

Display usage information for this application

Защищенные методы

Метод Описание
CheckFile ( string fileName ) : string

Verifies the file name exists.

Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

GetArgument ( string prefix, string args ) : string

Gets an argument value with the given prefix. Arguments follow the convention [prefix]:[value]

IsSwitchDefined ( string strSwitch, string args ) : bool

Checks if a given parameter switch was defined

OnCancelKeyPress ( object sender, ConsoleCancelEventArgs e ) : void
ThrowIfEmpty ( string value, string parameter ) : void

Throws an ArgumentException if the given parameter value is empty

Описание методов

Ask() публичный Метод

Asks the specified question.
public Ask ( string question ) : bool
question string The question.
Результат bool

CheckFile() защищенный Метод

Verifies the file name exists.
protected CheckFile ( string fileName ) : string
fileName string
Результат string

Dispose() публичный Метод

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Releases unmanaged and - optionally - managed resources
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
Результат void

GetArgument() защищенный статический Метод

Gets an argument value with the given prefix. Arguments follow the convention [prefix]:[value]
protected static GetArgument ( string prefix, string args ) : string
prefix string
args string
Результат string

IsSwitchDefined() защищенный статический Метод

Checks if a given parameter switch was defined
protected static IsSwitchDefined ( string strSwitch, string args ) : bool
strSwitch string
args string
Результат bool

OnCancelKeyPress() защищенный Метод

protected OnCancelKeyPress ( object sender, ConsoleCancelEventArgs e ) : void
sender object
e System.ConsoleCancelEventArgs
Результат void

ParseArguments() публичный абстрактный Метод

Parse application-specific arguments.
public abstract ParseArguments ( string args ) : void
args string The array of commandline arguments
Результат void

Run() публичный Метод

Run the application
public Run ( string args ) : void
args string The array of commandline arguments
Результат void

ShowUsage() публичный абстрактный Метод

Display usage information for this application
public abstract ShowUsage ( ) : void
Результат void

ThrowIfEmpty() защищенный статический Метод

Throws an ArgumentException if the given parameter value is empty
protected static ThrowIfEmpty ( string value, string parameter ) : void
value string
parameter string
Результат void

Описание свойств

_Command защищенное свойство

The command to be executed
protected IConsoleCommand _Command
Результат IConsoleCommand