메소드 | 설명 | |
---|---|---|
CommandLine ( ) : System | ||
GetGlobals ( string name ) : IList |
||
GetMemberNames ( string code ) : IList |
||
Run ( ScriptEngine engine, IConsole console, ConsoleOptions options ) : void |
Executes the comand line - depending upon the options provided we will either run a single file, a single command, or enter the interactive loop.
|
|
Terminate ( int exitCode ) : void |
메소드 | 설명 | |
---|---|---|
CreateCommandDispatcher ( ) : ICommandDispatcher | ||
CreateScope ( ) : |
||
ExecuteCommand ( ScriptSource source ) : object | ||
ExecuteCommand ( string command ) : void | ||
GetCommandProperties ( string code ) : ScriptCodeParseResult | ||
GetNextAutoIndentSize ( string text ) : int |
Gets the next level for auto-indentation
|
|
GetOutputWriter ( bool isErrorOutput ) : |
||
Initialize ( ) : void | ||
PrintLogo ( ) : void | ||
ReadLine ( int autoIndentSize ) : string | ||
ReadStatement ( bool &continueInteraction ) : string |
Read a statement, which can potentially be a multiple-line statement suite (like a class declaration).
|
|
Run ( ) : int |
Runs the command line. Languages can override this to provide custom behavior other than: 1. Running a single command 2. Running a file 3. Entering the interactive console loop.
|
|
RunCommand ( string command ) : int | ||
RunFile ( string fileName ) : int | ||
RunInteractive ( ) : int |
Starts the interactive loop. Performs any initialization necessary before starting the loop and then calls RunInteractiveLoop to start the loop. Returns the exit code when the interactive loop is completed.
|
|
TryInteractiveAction ( ) : int? |
Attempts to run a single interaction and handle any language-specific exceptions. Base classes can override this and call the base implementation surrounded with their own exception handling. Returns null if successful and execution should continue, or an exit code.
|
|
UnhandledException ( |
메소드 | 설명 | |
---|---|---|
IsFatalException ( |
||
RunFile ( ScriptSource source ) : int | ||
RunInteractiveLoop ( ) : int | ||
RunOneInteraction ( ) : int? |
Parses a single interactive command or a set of statements and executes it. Returns null if successful and execution should continue, or the appropiate exit code. We check if the code read is an interactive command or statements is by checking for NewLine If the code contains NewLine, it's a set of statements (most probably from SendToConsole) If the code does not contain a NewLine, it's an interactive command typed by the user at the prompt
|
|
Shutdown ( ) : void | ||
TreatAsBlankLine ( string line, int autoIndentSize ) : bool |
Private helper function to see if we should treat the current input as a blank link. We do this if we only have auto-indent text.
|
protected CreateCommandDispatcher ( ) : ICommandDispatcher | ||
리턴 | ICommandDispatcher |
protected ExecuteCommand ( ScriptSource source ) : object | ||
source | ScriptSource | |
리턴 | object |
protected GetCommandProperties ( string code ) : ScriptCodeParseResult | ||
code | string | |
리턴 | ScriptCodeParseResult |
protected GetNextAutoIndentSize ( string text ) : int | ||
text | string | |
리턴 | int |
protected GetOutputWriter ( bool isErrorOutput ) : |
||
isErrorOutput | bool | |
리턴 |
protected ReadStatement ( bool &continueInteraction ) : string | ||
continueInteraction | bool | Should the console session continue, or did the user indicate /// that it should be terminated? |
리턴 | string |
public Run ( ScriptEngine engine, IConsole console, ConsoleOptions options ) : void | ||
engine | ScriptEngine | |
console | IConsole | |
options | ConsoleOptions | |
리턴 | void |
protected UnhandledException ( |
||
e | ||
리턴 | void |