Метод | Описание | |
---|---|---|
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 CreateScope ( ) : |
||
Результат |
protected ExecuteCommand ( ScriptSource source ) : object | ||
source | ScriptSource | |
Результат | object |
protected ExecuteCommand ( string command ) : void | ||
command | string | |
Результат | void |
protected GetCommandProperties ( string code ) : ScriptCodeParseResult | ||
code | string | |
Результат | ScriptCodeParseResult |
public GetMemberNames ( string code ) : IList |
||
code | string | |
Результат | IList |
protected GetNextAutoIndentSize ( string text ) : int | ||
text | string | |
Результат | int |
protected GetOutputWriter ( bool isErrorOutput ) : |
||
isErrorOutput | bool | |
Результат |
protected ReadLine ( int autoIndentSize ) : string | ||
autoIndentSize | int | |
Результат | string |
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 RunCommand ( string command ) : int | ||
command | string | |
Результат | int |
protected RunFile ( string fileName ) : int | ||
fileName | string | |
Результат | int |
protected UnhandledException ( |
||
e | ||
Результат | void |