C# Class Universe.Framework.ConsoleFramework.CommandConsole

A console that processes commands internally
Inheritance: ICommandConsole, IDisposable
Mostrar archivo Open project: Virtual-Universe/Virtual-Universe

Public Properties

Property Type Description
m_Commands Commands
m_ConsoleScenes List
m_consoleScene IScene
m_isPrompting bool
m_lastSetPromptOption int
m_promptOptions List

Protected Properties

Property Type Description
m_defaultPrompt string
m_logDate DateTime
m_logFile TextWriter
m_logName string
m_logPath string

Public Methods

Method Description
CleanInfo ( object message ) : void
CleanInfoFormat ( string format ) : void
CompareLogLevels ( string a, string b ) : bool
Debug ( object message ) : void
DebugFormat ( string format ) : void
Dispose ( ) : void
Error ( object message ) : void
ErrorFormat ( string format ) : void
Fatal ( object message ) : void
FatalFormat ( string format ) : void
Format ( Level level, string format ) : void
FormatNoTime ( Level level, string format ) : void
Help ( IScene scene, string cmd ) : void
Info ( object message ) : void
InfoFormat ( string format ) : void
Initialize ( IConfigSource source, ISimulationBase simBase ) : void
LockOutput ( ) : void
Log ( Level level, object message ) : void
Output ( string text, Level level ) : void
OutputNoTime ( string text, Level level ) : void
PasswordPrompt ( string p ) : string
Prompt ( string prompt ) : string
Prompt ( string prompt, string defaultResponse ) : string
Prompt ( string prompt, string defaultResponse, List excludedCharacters ) : string
Prompt ( string prompt, string defaultresponse, List options ) : string
Prompt ( string prompt, string defaultresponse, List options, List excludedCharacters ) : string
Prompt ( ) : void

Display a command prompt on the console and wait for user input

ReadConsole ( ) : void

Starts the prompt for the console. This will never stop until the region is closed.

ReadLine ( string p, bool isCommand, bool e ) : string
RunCommand ( string cmd ) : void
Ticker ( ) : void
Ticker ( string message, bool newline ) : void
Trace ( object message ) : void
TraceFormat ( string format ) : void
UnlockOutput ( ) : void
Warn ( object message ) : void
WarnFormat ( string format ) : void

Protected Methods

Method Description
InitializeLog ( string logPath, string logName, ISimulationBase simbase ) : void
OpenLog ( ) : void
RotateLog ( ) : void

Private Methods

Method Description
InternalPrompt ( string prompt, string defaultresponse, List options ) : string

Method Details

CleanInfo() public method

public CleanInfo ( object message ) : void
message object
return void

CleanInfoFormat() public method

public CleanInfoFormat ( string format ) : void
format string
return void

CompareLogLevels() public method

public CompareLogLevels ( string a, string b ) : bool
a string
b string
return bool

Debug() public method

public Debug ( object message ) : void
message object
return void

DebugFormat() public method

public DebugFormat ( string format ) : void
format string
return void

Dispose() public method

public Dispose ( ) : void
return void

Error() public method

public Error ( object message ) : void
message object
return void

ErrorFormat() public method

public ErrorFormat ( string format ) : void
format string
return void

Fatal() public method

public Fatal ( object message ) : void
message object
return void

FatalFormat() public method

public FatalFormat ( string format ) : void
format string
return void

Format() public method

public Format ( Level level, string format ) : void
level Level
format string
return void

FormatNoTime() public method

public FormatNoTime ( Level level, string format ) : void
level Level
format string
return void

Help() public method

public Help ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

Info() public method

public Info ( object message ) : void
message object
return void

InfoFormat() public method

public InfoFormat ( string format ) : void
format string
return void

Initialize() public method

public Initialize ( IConfigSource source, ISimulationBase simBase ) : void
source IConfigSource
simBase ISimulationBase
return void

InitializeLog() protected method

protected InitializeLog ( string logPath, string logName, ISimulationBase simbase ) : void
logPath string
logName string
simbase ISimulationBase
return void

LockOutput() public method

public LockOutput ( ) : void
return void

Log() public method

public Log ( Level level, object message ) : void
level Level
message object
return void

OpenLog() protected method

protected OpenLog ( ) : void
return void

Output() public method

public Output ( string text, Level level ) : void
text string
level Level
return void

OutputNoTime() public method

public OutputNoTime ( string text, Level level ) : void
text string
level Level
return void

PasswordPrompt() public method

public PasswordPrompt ( string p ) : string
p string
return string

Prompt() public method

public Prompt ( string prompt ) : string
prompt string
return string

Prompt() public method

public Prompt ( string prompt, string defaultResponse ) : string
prompt string
defaultResponse string
return string

Prompt() public method

public Prompt ( string prompt, string defaultResponse, List excludedCharacters ) : string
prompt string
defaultResponse string
excludedCharacters List
return string

Prompt() public method

public Prompt ( string prompt, string defaultresponse, List options ) : string
prompt string
defaultresponse string
options List
return string

Prompt() public method

public Prompt ( string prompt, string defaultresponse, List options, List excludedCharacters ) : string
prompt string
defaultresponse string
options List
excludedCharacters List
return string

Prompt() public method

Display a command prompt on the console and wait for user input
public Prompt ( ) : void
return void

ReadConsole() public method

Starts the prompt for the console. This will never stop until the region is closed.
public ReadConsole ( ) : void
return void

ReadLine() public method

public ReadLine ( string p, bool isCommand, bool e ) : string
p string
isCommand bool
e bool
return string

RotateLog() protected method

protected RotateLog ( ) : void
return void

RunCommand() public method

public RunCommand ( string cmd ) : void
cmd string
return void

Ticker() public method

public Ticker ( ) : void
return void

Ticker() public method

public Ticker ( string message, bool newline ) : void
message string
newline bool
return void

Trace() public method

public Trace ( object message ) : void
message object
return void

TraceFormat() public method

public TraceFormat ( string format ) : void
format string
return void

UnlockOutput() public method

public UnlockOutput ( ) : void
return void

Warn() public method

public Warn ( object message ) : void
message object
return void

WarnFormat() public method

public WarnFormat ( string format ) : void
format string
return void

Property Details

m_Commands public_oe property

public Commands m_Commands
return Commands

m_ConsoleScenes public_oe property

public List m_ConsoleScenes
return List

m_consoleScene public_oe property

public IScene m_consoleScene
return IScene

m_defaultPrompt protected_oe property

protected string m_defaultPrompt
return string

m_isPrompting public_oe property

public bool m_isPrompting
return bool

m_lastSetPromptOption public_oe property

public int m_lastSetPromptOption
return int

m_logDate protected_oe property

protected DateTime m_logDate
return DateTime

m_logFile protected_oe property

protected TextWriter m_logFile
return TextWriter

m_logName protected_oe property

protected string m_logName
return string

m_logPath protected_oe property

protected string m_logPath
return string

m_promptOptions public_oe property

public List m_promptOptions
return List