IGLib
1.7.2
The IGLib base library for development of numerical, technical and business applications.
|
Dynamically compiles, loads and instantiates classes of type ILoadableScript from files or from strings. More...
Public Member Functions | |
ScriptLoaderBase () | |
virtual void | InitializeScriptLoader () |
Initializes the current script loader. More... | |
virtual void | ClearLogger () |
Clears the logger. More... | |
virtual string | GetExampleCode () |
Gets example code base (a template code for compiling) where names of classes, methods etc. are properly set. More... | |
virtual string | GetExampleCode (string pureScript) |
Returns a complete example code that can be loaded and run. More... | |
void | CheckAndCorrectNames () |
Corrects the ClassName (if the current class name has already been used) and namespace and class name in the loaded scritp code (if they don't correspond to ClassNamespace and ClassName, respectively). More... | |
virtual string | GetExecutableDirectory () |
Returns the directory containing the executable that started the current application. More... | |
virtual void | AddReferencedAssembly (string assemblyFile) |
Adds an additional referenced assembly by name of the assembly file. Assmebly is only added if it is not yet contained in the list of referenced assemblies and if the specified assembly file name is not null or empty string. More... | |
virtual void | AddReferencedAssemblies (params string[] assemblyFiles) |
Adds the specified assemblies to the list of referenced assemblies. Assemblise are added only if not yet on the list and if their names are not null or empty strings. More... | |
virtual void | SetReferencedAssemblies (params string[] assemblyFiles) |
Sets the list of referenced assemblies in such a way that it contains only the specified assemblies. More... | |
virtual void | RemoveReferencedAssembly (string assemblyFile) |
Removes the specified assembly from the list of referenced assemblies. If the specified assembly does not exist on the list or it is a null or empty string then nothing happens. More... | |
virtual void | RemoveReferencedAssemblies (params string[] assemblyFiles) |
Removes the specified assemblies from the list of referenced assemblies. More... | |
virtual void | RemoveAllReferencedAssemblies () |
Removes all assemblies from tehe list of referenced assemblies. More... | |
virtual string[] | GetReferencedAssemblies () |
Returns an array of assemblies (paths, sometimes only file names) that are currently referenced by the compiler on the current script loader. More... | |
virtual string | Compile () |
Compiles the code that is currently loaded by the current loader, and returns full name of the compiled script class. More... | |
virtual void | UnloadApplicationDomain () |
Unloads the application domain used by the current script loader. More... | |
virtual ILoadableScript | CreateObject (string[] initializationArguments) |
Creates and returns an object of the class that has been last compiled. The created object is also stored such that it can later be accessed through the CreatedObject property. More... | |
virtual ILoadableScript | CreateLoadableObject (string[] initializationArguments, bool storeObject) |
Creates and returns an object of the class that has been last compiled. More... | |
virtual ILoadableScript | CreateLoadableObject (string[] initializationArguments, string classFullName) |
Creates and returns an object of the specified loadable class. More... | |
virtual void | Run (string[] initializationAndRunArguments) |
Runs the object of the compiled loadable class (calls its Run() method) that is currently loaded by the current loader. Compiles the code and creates the object if necessary. More... | |
virtual void | Run (string[] initializationArguments, string[] runArguments) |
Runs the object of the compiled loadable class (calls its Run() method) that is currently loaded by the current loader. Compiles the code and creates the object if necessary. More... | |
void | LoadCode (string code, string classFullName) |
Loads code form a string. More... | |
void | LoadCode (string code) |
Loads code form a string. Class name is extracted from the code. More... | |
ILoadableScript | CreateObjectFromCode (string code, string className, string[] initializationArguments) |
Creates and returns a loadable script object form code. More... | |
ILoadableScript | CreateObjectFromCode (string code, string[] initializationArguments) |
Creates and returns a loadable script object form code. Class name is extracted from code. More... | |
string | RunCode (string code, string className, string[] initializationArguments, string[] runArguments) |
Creates and runs a loadable script object form code. More... | |
string | RunCode (string code, string[] initializationArguments, string[] runArguments) |
Creates and returns a loadable script object form code. Class name is extracted from code. More... | |
string | RunCode (string code, string className, string[] initializationAndRunArguments) |
Runs a loadable script object form code. More... | |
string | RunCode (string code, string[] initializationAndRunArguments) |
Creates and returns a loadable script object form code. Class name is extracted from code. More... | |
void | LoadFile (string filePath, string className) |
Loads loadable script code form the specified file. More... | |
void | LoadFile (string filePath) |
Loads loadable script code form a file. Name of the class is extracted from the file contents. More... | |
ILoadableScript | CreateObjectFromFile (string filePath, string className, string[] initializationArguments) |
Creates and returns a loadable script object form a file containing its code. More... | |
ILoadableScript | CreateObjectFromFile (string filePath, string[] initializationArguments) |
Creates and returns a loadable script object form code. Class name is extracted from code. More... | |
string | RunFile (string filePath, string className, string[] initializationArguments, string[] runArguments) |
Executes a loadable script form a file. The file must contain definition of the loadable script class that is used to instantiate an object and execute it. More... | |
string | RunFile (string filePath, string[] initializationArguments, string[] runArguments) |
Executes a loadable script form a file. The file must contain definition of the loadable script class that is used to instantiate an object and execute it. Class name is extracted from code. More... | |
string | RunFile (string filePath, string className, string[] initializationAndRunArguments) |
Executes a loadable script form a file. The file must contain definition of the loadable script class that is used to instantiate an object and execute it. The same arguments are taken for initialization of the loadable script object and for execution of the script. More... | |
string | RunFile (string filePath, string[] initializationAndRunArguments) |
Executes a loadable script form a file. The file must contain definition of the loadable script class that is used to instantiate an object and execute it. The same arguments are taken for initialization of the loadable script object and for execution of the script. Class name is extracted from code. More... | |
Static Public Member Functions | |
static void | InitializeScripting () |
Initializes the scripting system. More... | |
static ILoadableScript | GetLoadableScriptC (ILoadableScript scriptObject) |
Returns the loadable script object if the script object is actually loadable, or null if it is not meant as loadable. More... | |
static byte[] | LoadFileBytes (string filePath) |
Copies the specified file to byte array and returns it. More... | |
static ILoadableScript | CreateScriptObject (string scriptClassFullName) |
Creates and returns a new script obect of the specified type. More... | |
static ILoadableScript | CreateScriptObject (string scriptClassFullName, int outputLevel) |
Creates and returns a new script obect of the specified type. More... | |
static void | AddDefaultAssemblies (params string[] assemblies) |
Add the specified assemblies (just their names) to the list of assemblies that are referenced by newly created script loaders by default. More... | |
static void | RemoveDefaultAssemblies (params string[] assemblies) |
Removes the specified assemblies from the list of default assemblies that are referenced by newly created script loaders. More... | |
static void | ClearDefaultAssemblies () |
Clears the list of assemblies that are referenced by default by newly created script loaders. More... | |
static bool | IsClassFullNameUsed (string classFillName) |
Returns a flag indicating whether the specified class full name has already been used or not. More... | |
static string | FindNameAfterKeyword (string code, string keyword, string allowedCharacters) |
In the specified string, finds a name that follows the specified keyword, and returns it. Name must directly follow the keyword with only blank characters between them, and it end at the first character that is not alphanumeric and is also not contained in the specified string of allowed characters. More... | |
static string | FindNamespace (string code) |
Finds and returns the name of the first namespace that is defined in the specified C# code block. A null string is returned if the name can not be found. More... | |
static string | FindClassName (string code) |
Finds and returns the name of the first class that is defined in the specified C# code block. A null string is returned if the name can not be found. More... | |
static string | GetFileContents (string filePath) |
Returns contents of the specified file. More... | |
Protected Member Functions | |
void | AddDefaultReferencedAssemblies () |
Add assemblies that are referenced by default to the list of assemblies that are referenced by the current script loader. More... | |
void | CreateNonexistentLibraryPath () |
Modifies library path in such a way that it points to an non-existent file. More... | |
virtual void | AddReferencedAssemblies (System.CodeDom.Compiler.CompilerParameters compilerParameters) |
Adds referenced assemblies to the specified compiler parameters, according to current settings. More... | |
Static Protected Member Functions | |
static string | CreateNonexistentFilePath (string originalPath) |
Returns a file path that does not exist and is derived form the specified file path by adding a suffix composed of underscore and a number. More... | |
Protected Attributes | |
string | _code = null |
string | _libraryFilename = null |
string | _originalLibraryPath = null |
List< string > | _referencedAssimblies = new List<string>() |
bool | _referenceAllLoadedAssemblies = true |
Properties | |
bool | IsScriptLoaderInitialized [get, protected set] |
Whether the current script loader is initialized or not. More... | |
static bool | IsScriptingInitialized [get, protected set] |
Whether scripting system is initialized or not. More... | |
object | Lock [get] |
This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. More... | |
static List< string > | DefaultAssemblies [get] |
Gets the list of assemblies that are added to all newly created script loaders by default. More... | |
static SortedList< string, string > | UsedClassFullNames [get] |
Stores used class names, i.e. class names that have already been used for dynamiically loaded classes. More... | |
static ScriptLoaderBase | Global [get, set] |
Global script loader. Getter always returns a non-null object. More... | |
int | OutputLevel [get, set] |
Definbes level of output on console that is generated by some operations. 0 means that no output will be written to the console. More... | |
virtual Logger | Logger [get] |
Gets the logger that is used to log errors and warnings. More... | |
virtual string | Code [get, set] |
Gets or sets code to be compiled. Get: If not assigned explicitly then CodeBase is taken. More... | |
bool | PerformNamesCorrection [get, set] |
Specifies whether automatic checking and correction of the class and namespace name in the loaded code is performed. If correction is switched on, it is performed before every compilation. Correction first checks if the class name has already been used, and if this is the case, it changes the name to the one that has not yet been used. It is then checked whether the namespace and class names used in the code are the same as those set on the current script loader. If not then names are replaced. At this stage, the assumed namespace class names are the first namespace and the first class found in the code block. More... | |
virtual string | LanguageName [get, protected set] |
Language used by compiler. More... | |
virtual string | ClassNamespace [get, protected set] |
Namespace in which the compiled class is defined. More... | |
virtual string | ClassInterface [get] |
Interface that is implemented by the compiled class. More... | |
virtual string | ClassName [get, set] |
virtual string | ClassFullName [get] |
Name of the compiled class that contains loadable script. More... | |
virtual string | AppDomainName [get, set] |
Name of the application domain in which the class is loaded. More... | |
virtual string | RunFunctionName [get, protected set] |
Name of the method of dynamically loadable classes that contains the runnable script. More... | |
virtual string | InitFunctionName [get, protected set] |
Name of the initialization method of dynamically loadable classes. More... | |
virtual string | ArgumentsName [get, set] |
Agreed formal name of the arguments parameter. Agreement upon this name makes possible to execute scripts in which run arguments are referenced. More... | |
virtual string | LibraryFilename [get, set] |
virtual string | LibraryDirectory [get, protected set] |
Returns directory where library will be compiled, which will be the directory of the executable that started the application. More... | |
virtual string | LibraryPath [get, protected set] |
Path to the dll where code is compiled. We take the directory where executable is located. More... | |
virtual bool | IsCodeLoaded [get, protected set] |
Whether scripting code to be compiled is loaded. More... | |
virtual bool | IsCompiled [get, protected set] |
Whether the code is compiled. More... | |
virtual bool | IsClassLoaded [get, protected set] |
Whether the compiled class corresponding to the script is prepared. More... | |
virtual bool | IsObjectPrepared [get, protected set] |
Whether an instance of the object is prepared to be used. More... | |
virtual CompilerResults | CompilerResults [get, protected set] |
Results of compilation. More... | |
virtual List< String > | ReferencedAssemblies [get] |
List of assemblies that are referenced when compiling the code. Contains names of files containing referenced assemblies. More... | |
virtual bool | ReferenceAllLoadedAssemblies [get, set] |
If true then all assemblies that are currently loaded by the application are also added to the referenced assemblies when script code is compiled. This makes sure that all that is necessary is actually referenced. More... | |
virtual AppDomain | ApplicationDomain [get, set] |
Application domain used by the current script loader for loading assemblies. More... | |
virtual Assembly | Assembly [get, protected set] |
Gets or sets the assembly that has been compiled and loaded into the current application domain from the source code. More... | |
virtual ILoadableScript | CreatedObject [get, protected set] |
Object of the compiled class that has beeen created. More... | |
Properties inherited from IG.Lib.ILockable | |
object | Lock [get] |
Private Attributes | |
bool | _isScriptLoaderInitialized = false |
object | _mainLock = new object() |
int | _outputLevel = Util.OutputLevel |
Logger | _logger = new Logger() |
bool | _nameCorrection = true |
string | _languageName = "CSharp" |
string | _namespace = "IG.Script" |
string | _interface = "IG.Lib.ILoadableScript" |
string | _className = "TestClass" |
string | _appDomainName = "NewDomain" |
string | _runFunctionName = "RunThis" |
string | _initFunctionName = "InitializeThis" |
string | _argumentsName = "arguments" |
string | _libraryPath = null |
string | _libraryDirectory = null |
bool | _isCodeLoaded = false |
bool | _isCompiled = false |
bool | _isClassLoaded = false |
bool | _isObjectPrepared = false |
CompilerResults | _compilerResults |
AppDomain | _applicationDomain |
Assembly | _assembly |
ILoadableScript | _runnableObject |
Static Private Attributes | |
static bool | _isScriptingInitialized = false |
static List< string > | _defaultAssemblies |
static SortedList< string, string > | _usedClassFullNames |
static ScriptLoaderBase | _global |
Dynamically compiles, loads and instantiates classes of type ILoadableScript from files or from strings.
$A Igor Jul09 Feb10;
|
inline |
|
inlinevirtual |
Initializes the current script loader.
|
inlinestatic |
Initializes the scripting system.
|
inlinestatic |
Returns the loadable script object if the script object is actually loadable, or null if it is not meant as loadable.
scriptObject | Script object to be returned if the object itself is loadable. |
This method filters out the controllable loadable scripts (i.e. the scripts that implement the ILoadableScriptC interface) that are not loadable by property ILoadableScriptC.IsLoadable.
References IG.Lib.ILoadableScriptC.IsLoadable.
|
inlinestatic |
Copies the specified file to byte array and returns it.
TODO: move this to utils or something like that!
|
inlinestatic |
Creates and returns a new script obect of the specified type.
null is returned if the oject can not be created (but no exception is thrown).
scriptClassFullName | Full name of the script class whose object is created. |
Referenced by IG.Lib.CommandLineApplicationInterpreter.CmdRunInternalScriptClass().
|
inlinestatic |
Creates and returns a new script obect of the specified type.
null is returned if the oject can not be created (but no exception is thrown).
scriptClassFullName | Full name of the script class whose object is created. |
outputLevel | Level of output to console. |
|
inlinestatic |
Add the specified assemblies (just their names) to the list of assemblies that are referenced by newly created script loaders by default.
assemblies | Names of assemblies that are added to the list. |
References IG.Lib.Util.LockGlobal.
Referenced by IG.Lib.ApplicationCommandlineBase.AddDefaultAssemblies(), IG.Lib.ShellApplication< InterpreterType >.AddDefaultAssemblies(), IG.Lib.ModuleBase.AddDefaultAssembliesExtShellApp(), and IG.Lib.ModuleBase.AnnAdd().
|
inlinestatic |
Removes the specified assemblies from the list of default assemblies that are referenced by newly created script loaders.
assemblies | names of assemblies that are removed from the list. |
References IG.Lib.Util.LockGlobal.
|
inlinestatic |
Clears the list of assemblies that are referenced by default by newly created script loaders.
References IG.Lib.Util.LockGlobal.
|
inlineprotected |
Add assemblies that are referenced by default to the list of assemblies that are referenced by the current script loader.
Assemblies that are referenced by default can be set by the ScriptLoaderBase.AddDefaultAssemblies method.
|
inlinestatic |
Returns a flag indicating whether the specified class full name has already been used or not.
classFillName | Fully qualified class name (namespace and class). |
|
inlinevirtual |
Clears the logger.
References IG.Lib.Logger.Clear().
|
inlinevirtual |
Gets example code base (a template code for compiling) where names of classes, methods etc. are properly set.
|
inlinevirtual |
Returns a complete example code that can be loaded and run.
<pparam name="pureScript">Code that is inserted in the LoadableScriptBase.RunThis method.</pparam>
|
inlinestatic |
In the specified string, finds a name that follows the specified keyword, and returns it. Name must directly follow the keyword with only blank characters between them, and it end at the first character that is not alphanumeric and is also not contained in the specified string of allowed characters.
code | String in which the specified name is searched for. |
keyword | Keyword. |
allowedCharacters | Eventual string arguments that contains characters that are allowed beside the alphanumeric characters. |
This functions can be used e.g. for searching for class names or namespace names in code blocks. The method is currently not implemented very efficiently because it uses access to characters of a string through their within the string.
|
inlinestatic |
Finds and returns the name of the first namespace that is defined in the specified C# code block. A null string is returned if the name can not be found.
code | Code block where namespace name is searched for. |
|
inlinestatic |
Finds and returns the name of the first class that is defined in the specified C# code block. A null string is returned if the name can not be found.
code | Code block where class name is searched for. |
|
inline |
Corrects the ClassName (if the current class name has already been used) and namespace and class name in the loaded scritp code (if they don't correspond to ClassNamespace and ClassName, respectively).
References IG.Lib.Logger.LogWarning().
|
inlinevirtual |
Returns the directory containing the executable that started the current application.
References IG.Lib.UtilSystem.GetExecutableDirectory().
|
inlinevirtual |
Adds an additional referenced assembly by name of the assembly file. Assmebly is only added if it is not yet contained in the list of referenced assemblies and if the specified assembly file name is not null or empty string.
assemblyFile | File name of the assembly that is added to referenced assemblies. |
|
inlinevirtual |
Adds the specified assemblies to the list of referenced assemblies. Assemblise are added only if not yet on the list and if their names are not null or empty strings.
assemblyFiles | A table of file names of the assemblies to be added. |
|
inlinevirtual |
Sets the list of referenced assemblies in such a way that it contains only the specified assemblies.
assemblyFiles | Array of file names of the assemblies to be contained in the list. |
|
inlinevirtual |
Removes the specified assembly from the list of referenced assemblies. If the specified assembly does not exist on the list or it is a null or empty string then nothing happens.
assemblyFile | File name of the assembly to be removed. |
|
inlinevirtual |
Removes the specified assemblies from the list of referenced assemblies.
assemblyFiles | Array of file names of the assemblies to be removed from the list. |
|
inlinevirtual |
Removes all assemblies from tehe list of referenced assemblies.
|
inlinestaticprotected |
Returns a file path that does not exist and is derived form the specified file path by adding a suffix composed of underscore and a number.
originalPath | Original file path. |
Even if the file with original path does not exist, the method finds and returns a new path.
|
inlineprotected |
Modifies library path in such a way that it points to an non-existent file.
|
inlineprotectedvirtual |
Adds referenced assemblies to the specified compiler parameters, according to current settings.
compilerParameters | Compiler parameters on which referenced assemblies ar added. |
References IG.Lib.Logger.LogWarning().
|
inlinevirtual |
Returns an array of assemblies (paths, sometimes only file names) that are currently referenced by the compiler on the current script loader.
|
inlinevirtual |
Compiles the code that is currently loaded by the current loader, and returns full name of the compiled script class.
References IG.Lib.Logger.GetErrorsReport(), IG.Lib.Logger.LogError(), IG.Lib.Logger.LogInfo(), and IG.Lib.Logger.LogWarning().
|
inlinevirtual |
Unloads the application domain used by the current script loader.
|
inlinevirtual |
Creates and returns an object of the class that has been last compiled. The created object is also stored such that it can later be accessed through the CreatedObject property.
initializationArguments | Initialization arguments. |
|
inlinevirtual |
Creates and returns an object of the class that has been last compiled.
initializationArguments | Initialization arguments. |
storeObject | If true then the created object is stored such that it can be accessed via CreatedObject property. |
|
inlinevirtual |
Creates and returns an object of the specified loadable class.
initializationArguments | Initialization arguments. |
classFullName | Full name of the class that is instantiated. |
References IG.Lib.ILoadableScript.InitializationArguments.
|
inlinevirtual |
Runs the object of the compiled loadable class (calls its Run() method) that is currently loaded by the current loader. Compiles the code and creates the object if necessary.
initializationAndRunArguments | Arguments used both for initialization and running of the object. |
|
inlinevirtual |
Runs the object of the compiled loadable class (calls its Run() method) that is currently loaded by the current loader. Compiles the code and creates the object if necessary.
initializationArguments | Argumets used for initialization of the object. |
runArguments | Arguments used to run the object. |
|
inline |
Loads code form a string.
code | String containing script code that is loaded. |
classFullName | Name of the class that is contained in the code and contains loadable script that can be executed. |
|
inline |
Loads code form a string. Class name is extracted from the code.
code | String containing script code that is loaded. |
|
inline |
Creates and returns a loadable script object form code.
code | Code that contains class definition and is dynamically compiled. |
className | Name of the class containing loadable script code. |
initializationArguments | Initialization arguments for the created object. |
|
inline |
Creates and returns a loadable script object form code. Class name is extracted from code.
code | Code that contains class definition and is dynamically compiled. |
initializationArguments | Initialization arguments for the created object. |
|
inline |
Creates and runs a loadable script object form code.
code | Code that contains class definition and is dynamically compiled. |
className | Name of the class containing loadable script code. |
initializationArguments | Initialization arguments for the created object. |
runArguments | Arguments passed to the execution method of the loadable script. |
|
inline |
Creates and returns a loadable script object form code. Class name is extracted from code.
code | Code that contains class definition and is dynamically compiled. |
initializationArguments | Initialization arguments for the created object. |
runArguments | Arguments passed to the execution mathod of the loadable script. |
|
inline |
Runs a loadable script object form code.
code | Code that contains class definition and is dynamically compiled. |
className | Name of the class containing loadable script code. |
initializationAndRunArguments | Arguments used both for initialization of the loadable script object and as parameters of the executable method.. |
|
inline |
Creates and returns a loadable script object form code. Class name is extracted from code.
code | Code that contains class definition and is dynamically compiled. |
initializationAndRunArguments | Arguments used both for initialization of the loadable script object and as parameters of the executable method.. |
|
inlinestatic |
Returns contents of the specified file.
filePath | Path to the file. |
|
inline |
Loads loadable script code form the specified file.
filePath | Path to the file that contains script code. |
className | Name of the class that is contained in the code and embeds loadable script that can be executed. |
|
inline |
Loads loadable script code form a file. Name of the class is extracted from the file contents.
filePath | Path to the file that contains script code. |
|
inline |
Creates and returns a loadable script object form a file containing its code.
filePath | Path to the file that contains script code. |
className | Name of the class containing class definition for loadable script objects. |
initializationArguments | Initialization arguments for the created object. |
|
inline |
Creates and returns a loadable script object form code. Class name is extracted from code.
filePath | Path to the file that contains script code. |
initializationArguments | Initialization arguments for the created object. |
|
inline |
Executes a loadable script form a file. The file must contain definition of the loadable script class that is used to instantiate an object and execute it.
filePath | Path to the file that contains script code. |
className | Name of the class containing loadable script code. |
initializationArguments | Initialization arguments for the created object. |
runArguments | Arguments passed to the execution mathod of the loadable script. |
|
inline |
Executes a loadable script form a file. The file must contain definition of the loadable script class that is used to instantiate an object and execute it. Class name is extracted from code.
filePath | Path to the file that contains script code. |
initializationArguments | Initialization arguments for the created object. |
runArguments | Arguments passed to the execution mathod of the loadable script. |
|
inline |
Executes a loadable script form a file. The file must contain definition of the loadable script class that is used to instantiate an object and execute it. The same arguments are taken for initialization of the loadable script object and for execution of the script.
filePath | Path to the file that contains script code. |
className | Name of the class containing loadable script code. |
initializationAndRunArguments | Arguments used both for initialization of the loadable script object and as parameters of the executable method. |
|
inline |
Executes a loadable script form a file. The file must contain definition of the loadable script class that is used to instantiate an object and execute it. The same arguments are taken for initialization of the loadable script object and for execution of the script. Class name is extracted from code.
filePath | Path to the file that contains script code. |
initializationAndRunArguments | Arguments used both for initialization of the loadable script object and as parameters of the executable method. |
|
private |
|
staticprivate |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
private |
|
private |
|
private |
|
getprotected set |
Whether the current script loader is initialized or not.
|
staticgetprotected set |
Whether scripting system is initialized or not.
|
get |
This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock.
|
staticgetprotected |
Gets the list of assemblies that are added to all newly created script loaders by default.
|
staticgetprotected |
Stores used class names, i.e. class names that have already been used for dynamiically loaded classes.
Every time a new class is dynamically loaded, its full name is added to this list.
|
staticgetset |
Global script loader. Getter always returns a non-null object.
|
getset |
Definbes level of output on console that is generated by some operations. 0 means that no output will be written to the console.
|
get |
Gets the logger that is used to log errors and warnings.
|
getset |
Gets or sets code to be compiled. Get: If not assigned explicitly then CodeBase is taken.
|
getset |
Specifies whether automatic checking and correction of the class and namespace name in the loaded code is performed. If correction is switched on, it is performed before every compilation. Correction first checks if the class name has already been used, and if this is the case, it changes the name to the one that has not yet been used. It is then checked whether the namespace and class names used in the code are the same as those set on the current script loader. If not then names are replaced. At this stage, the assumed namespace class names are the first namespace and the first class found in the code block.
|
getprotected set |
Language used by compiler.
|
getprotected set |
Namespace in which the compiled class is defined.
|
get |
Interface that is implemented by the compiled class.
|
getset |
|
get |
Name of the compiled class that contains loadable script.
|
getset |
Name of the application domain in which the class is loaded.
|
getprotected set |
Name of the method of dynamically loadable classes that contains the runnable script.
|
getprotected set |
Name of the initialization method of dynamically loadable classes.
|
getset |
Agreed formal name of the arguments parameter. Agreement upon this name makes possible to execute scripts in which run arguments are referenced.
|
getset |
|
getprotected set |
Returns directory where library will be compiled, which will be the directory of the executable that started the application.
|
getprotected set |
Path to the dll where code is compiled. We take the directory where executable is located.
|
getprotected set |
Whether scripting code to be compiled is loaded.
|
getprotected set |
Whether the code is compiled.
|
getprotected set |
Whether the compiled class corresponding to the script is prepared.
|
getprotected set |
Whether an instance of the object is prepared to be used.
|
getprotected set |
Results of compilation.
|
get |
List of assemblies that are referenced when compiling the code. Contains names of files containing referenced assemblies.
|
getset |
If true then all assemblies that are currently loaded by the application are also added to the referenced assemblies when script code is compiled. This makes sure that all that is necessary is actually referenced.
|
getsetprotected |
Application domain used by the current script loader for loading assemblies.
|
getprotected set |
Gets or sets the assembly that has been compiled and loaded into the current application domain from the source code.
Setter is protected.
|
getprotected set |
Object of the compiled class that has beeen created.