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.

파일 보기 프로젝트 열기: aiclub/Mohawk_Battleship

공개 메소드들

메소드 설명
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