C# Class Microsoft.Scripting.Hosting.Shell.ConsoleHost

Core functionality to implement an interactive console. This should be derived for concrete implementations
Exibir arquivo Open project: jschementi/iron

Public Methods

Method Description
PrintLanguageHelp ( StringBuilder output ) : void
Terminate ( int exitCode ) : void

Request (from another thread) the console REPL loop to terminate

Protected Methods

Method Description
ConsoleHost ( ) : System
CreateCommandLine ( ) : CommandLine
CreateConsole ( ScriptEngine engine, CommandLine commandLine, ConsoleOptions options ) : IConsole
CreateLanguageSetup ( ) : LanguageSetup
CreateOptionsParser ( ) : OptionsParser
CreateRuntimeSetup ( ) : ScriptRuntimeSetup
ExecuteInternal ( ) : void
ParseHostOptions ( string args ) : void
ParseOptions ( string args, ScriptRuntimeSetup runtimeSetup, LanguageSetup languageSetup ) : ConsoleOptions
PrintException ( TextWriter output, Exception e ) : void
PrintHelp ( ) : void
PrintVersion ( ) : void
ReportInvalidOption ( InvalidOptionException e ) : void
UnhandledException ( ScriptEngine engine, Exception e ) : void

Private Methods

Method Description
CreateSuperConsole ( CommandLine commandLine, bool isColorful ) : IConsole
Execute ( ) : void
GetHelp ( ) : string
GetLanguageProvider ( ScriptRuntimeSetup setup ) : string
GetRuntime ( ) : string
InsertSearchPaths ( object>.IDictionary options, ICollection paths ) : void
PrintUsage ( ) : void
Run ( string args ) : int
RunCommandLine ( ) : int
RunFile ( ) : int
SetEnvironment ( ) : void

Method Details

ConsoleHost() protected method

protected ConsoleHost ( ) : System
return System

CreateCommandLine() protected method

protected CreateCommandLine ( ) : CommandLine
return CommandLine

CreateConsole() protected method

protected CreateConsole ( ScriptEngine engine, CommandLine commandLine, ConsoleOptions options ) : IConsole
engine ScriptEngine
commandLine CommandLine
options ConsoleOptions
return IConsole

CreateLanguageSetup() protected method

protected CreateLanguageSetup ( ) : LanguageSetup
return LanguageSetup

CreateOptionsParser() protected method

protected CreateOptionsParser ( ) : OptionsParser
return OptionsParser

CreateRuntimeSetup() protected method

protected CreateRuntimeSetup ( ) : ScriptRuntimeSetup
return ScriptRuntimeSetup

ExecuteInternal() protected method

protected ExecuteInternal ( ) : void
return void

ParseHostOptions() protected method

protected ParseHostOptions ( string args ) : void
args string
return void

ParseOptions() protected method

protected ParseOptions ( string args, ScriptRuntimeSetup runtimeSetup, LanguageSetup languageSetup ) : ConsoleOptions
args string
runtimeSetup ScriptRuntimeSetup
languageSetup LanguageSetup
return ConsoleOptions

PrintException() protected static method

protected static PrintException ( TextWriter output, Exception e ) : void
output System.IO.TextWriter
e System.Exception
return void

PrintHelp() protected method

protected PrintHelp ( ) : void
return void

PrintLanguageHelp() public method

public PrintLanguageHelp ( StringBuilder output ) : void
output StringBuilder
return void

PrintVersion() protected method

protected PrintVersion ( ) : void
return void

ReportInvalidOption() protected method

protected ReportInvalidOption ( InvalidOptionException e ) : void
e InvalidOptionException
return void

Terminate() public method

Request (from another thread) the console REPL loop to terminate
public Terminate ( int exitCode ) : void
exitCode int The caller can specify the exitCode corresponding to the event triggering /// the termination. This will be returned from CommandLine.Run
return void

UnhandledException() protected method

protected UnhandledException ( ScriptEngine engine, Exception e ) : void
engine ScriptEngine
e System.Exception
return void