class
MonoManager
Loads Mono script assemblies and manages script objects.
Public
Constructors
MonoManager
Methods
~MonoManager
LoadMonoLibrary
Loads the Mono library and sets up the relevant function pointers, if not loaded already.
Must be called before performing any other actions in this class.
UnloadMonoLibrary
Unloads the Mono library if loaded.
Caller must make sure to release all Mono objects before calling this method.
LoadAssembly
Loads a new assembly from the provided path.
- path
- Absolute path to the assembly .dll.
- name
- Unique name for the assembly.
UnloadAll
Unloads all assemblies and shuts down the runtime.
Called automatically on module shut-down.
FindClass
Searches all loaded assemblies for the specified class.
FindClass
Searches all loaded assemblies for the specified class.
FindClass
Searches all loaded assemblies for the specified class.
GetDomain
Returns the main (scripting) Mono domain.
GetAssembly
Attempts to find a previously loaded assembly with the specified name.
Returns null if assembly cannot be found.
UnloadScriptDomain
Unloads the active domain (in which all script assemblies are loaded) and destroys any managed objects associated with it.
GetFrameworkAssembliesFolder
Returns the absolute path of the folder where Mono framework assemblies are located.
GetMonoEtcFolder
Returns the absolute path to the Mono /etc folder that is required for initializing Mono.
GetCompilerPath
Returns the absolute path to the Mono compiler managed executable.
GetMonoExecPath
Returns the absolute path to the executable capable of executing managed assemblies.
staticRegisterScriptType
Registers a new script type.
This should be done before any assembly loading is done. Upon assembly load these script types will be initialized with necessary information about their managed counterparts.
- metaData
- Pointer to the meta-data object to initialize, stored statically on the associated TScriptObjectWrapper.
- localMetaData
- Local copy of the meta-data that will be used to initialize .
staticGetScriptWrapperTypeInformation
Returns a list of all registered script wrapper types, by assembly.
staticInstance
Returns a reference to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticInstancePtr
Returns a pointer to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticShutDown
Shuts down this module and frees any resources it is using.
staticIsStarted
Query if the module has been started.
Protected
Methods
~Module<T>
OnStartUp
Override if you want your module to be notified once it has been constructed and started.
OnShutDown
Override if you want your module to be notified just before it is deleted.
staticInstanceInternal
Returns a singleton instance of this module.
Private
Methods
RefreshScriptTypeMetaDataAndBindings
Initializes meta-data and sets up bindings for all script types registered with RegisterScriptType() for the provided assembly.
This should be called after an assembly is loaded or reloaded.