C# Класс MBC.App.BattleshipConsole.Input

The main part of the AppConsole that stores command strings that are associated with MBCShellCommandHandlers, which perform specific tasks. The strings that are input are then parsed to invoke the stored commands.

The commands modify the internal state of this particular class, specifically storing the controllers that are available.

Показать файл Открыть проект

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

Метод Описание
AddCommand ( MBCShellCommandHandler handler ) : void

Associates a number of newCmds to a handler.

RunCommand ( ) : bool

Runs a command, or a series of commands separated by a pipe "|" and passes the current index of the array of strings to the command handler to parse parameters when needed.

RunCommand ( string input ) : bool

Splits a string by whitespaces without splitting the strings encapsulated with double-quotes. Runs the Input.RunCommand(string[]) method with the parsed input.

Приватные методы

Метод Описание
Input ( ) : System
Main ( string args ) : void

AppConsole entry point

Stop ( int idx ) : void

Stops input.

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

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

Associates a number of newCmds to a handler.
public static AddCommand ( MBCShellCommandHandler handler ) : void
handler MBCShellCommandHandler The method to invoke from
Результат void

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

Runs a command, or a series of commands separated by a pipe "|" and passes the current index of the array of strings to the command handler to parse parameters when needed.
public static RunCommand ( ) : bool
Результат bool

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

Splits a string by whitespaces without splitting the strings encapsulated with double-quotes. Runs the Input.RunCommand(string[]) method with the parsed input.
public static RunCommand ( string input ) : bool
input string A string of input.
Результат bool