C# Class AdvancedLauncher.SDK.Management.Commands.AbstractExtendedCommand

Extended ICommand base implementation with subcommands support
Inheritance: AbstractCommand
Datei anzeigen Open project: GoldRenard/DMOAdvancedLauncher

Public Methods

Method Description
AbstractExtendedCommand ( string commandName, string commandDescription ) : System.Collections.Generic

Main constructor

DoCommand ( string args ) : bool

Root command action

Protected Methods

Method Description
CheckSubCommand ( string command ) : bool

Checks if specified command defined in subcommands list

CreateCommands ( ) : SubCommand>.Dictionary

Subcommand generation method. You must define your subcommands here.

GetCommandList ( ) : List

Returns help list of all available subcommands

LogInfo ( string value ) : void

You must define console output method here (usually ILogManager.Info(object))

Private Methods

Method Description
CheckInput ( string args ) : bool

Input validation

HelpCommand ( string args ) : bool

Prints help

Method Details

AbstractExtendedCommand() public method

Main constructor
public AbstractExtendedCommand ( string commandName, string commandDescription ) : System.Collections.Generic
commandName string Base command name to execute. See
commandDescription string Command description. See
return System.Collections.Generic

CheckSubCommand() protected method

Checks if specified command defined in subcommands list
protected CheckSubCommand ( string command ) : bool
command string Command name
return bool

CreateCommands() protected abstract method

Subcommand generation method. You must define your subcommands here.
protected abstract CreateCommands ( ) : SubCommand>.Dictionary
return SubCommand>.Dictionary

DoCommand() public method

Root command action
public DoCommand ( string args ) : bool
args string Input arguments
return bool

GetCommandList() protected method

Returns help list of all available subcommands
protected GetCommandList ( ) : List
return List

LogInfo() protected abstract method

You must define console output method here (usually ILogManager.Info(object))
protected abstract LogInfo ( string value ) : void
value string Value you want to log
return void