Icarus.Scripting
Summary description for ScriptingConsole.
Required designer variable.
This is a text writer that outputs the stuff to the console textbox.
Initialize the Scripting Console
Clean up any resources being used.
Required method for Designer support - do not modify
the contents of this method with the code editor.
Gets the console text writer.
Enumerates all the languages that can be used for scripting.
If more languages are added here, please modify ScriptingProvider.InitializeCodeCompilerFor function to get the proper compiler for the new language.
Represents the C# Programming language as being readable by the Scripting Engine
Represents the JScript Programming language as being readable by the Scripting Engine
Represents the Visual Basic Programming language as being readable by the Scripting Engine
This exception is thrown when we get an unknown file extension, or a bad language.
Delegates Exception handing
The text description of the error
The scripting provider class will handle providing scripting engines to the rest of the scripting module. It handles various code providers in such a way that they don't have to be reinitialized every time we want to use scripting.
Singleton Implementation.
This dictionary maps Language enum items to the code providers.
This is a dictionary of templates to use for wrapping around the executable code compiled for a specific language.
Maps file extensions to language that they correspond to.
Singleton Implementation.
Returns the code provider for the specified language.
Returns a template, so that when we perform a string format on it with one parameter, the resulting code is wrapped in whatever it needs to be wrapped in for the compiler to generate an executable.
Given the extension of a file, returns the language that the file's script is written in.
Generates a code provider for the specified language and registers it in our local dictionary.
Singleton Implementation.
This singleton class manages scripts. When a script is requested, the local register of recently compiled scripts will be checked, and if the script is already there, then it will be run. Otherwise, the script will be loaded from the hard drive and compiled and then executed.
Singleton Implementation.
These are the parameters that will be used to compile scripts.
Determines whether the recompile is forced or not.
The language that will be used to compile the scripts.
Singleton Implementation.
Initializes the Compiler Parameters with some default values.
Compiles and executes the script passed in. CurrentLanguage scripting language is used to compile the script.
The text of the script to run.
The arguments to pass to the main function of the script, if so desired.
If there were any compilation errors (and thus the script was not run) they are returned. Otherwise, returns null, which signifies a successful run.
Compiles and executes the file whose name is passed in. The language in which the script is written is deduced from the extension of the file.
The fully qualified name of the file to execute.
Optional arguments to pass to the main function of the script.
If there were any compilation errors, they are returned.
Singleton Implementation.
Gets or sets the force recompile property.
If it is true, then every time a script is requested, it will be recompiled.
If it is false, then the first time the script will be recompiled, but the consecutive times it will be referenced without recompilation.
Gets or sets the CurrentLanguage property. This is the language that will be used to compile the scripts.