C# Class Aura.Shared.Scripting.ScriptManager

Afficher le fichier Open project: aura-project/aura

Protected Properties

Свойство Type Description
_compilers Compiler>.Dictionary
_scripts Type>.Dictionary
_scriptsToDispose List

Méthodes publiques

Méthode Description
GetScriptType ( string typeName ) : Type

Returns the type of the script with the given name.

LoadScripts ( string scriptListFile ) : void

Loads scripts from list file.

ScriptManager ( ) : Aura.Data

Creates new script manager.

Méthodes protégées

Méthode Description
DisposeScripts ( ) : void

Disposes all disposable scripts and clears internal script list.

GetAssembly ( string path ) : Assembly

Loads assembly for script, compiles it if necessary. Returns null if there was a problem.

GetCachePath ( string path ) : string

Returns path for the compiled version of the script. Creates directory structure if it doesn't exist.

GetJITtedTypes ( Assembly asm, string filePath ) : IEnumerable

TODO: We might want to stop loading if this is a problem, scripts might depend on each other, which could lead to more errors.

ReadScriptList ( string scriptListFile ) : List

Returns list of script files loaded from scripts.txt.

Private Methods

Méthode Description
InitializeScripts ( ) : void

Initializes all scripts loaded from assemblies.

LoadScript ( string scriptPath ) : bool

Loads script from given path.

LoadScriptAssembly ( Assembly asm, string filePath ) : void

Reads script classes from assembly and adds them to internal script list.

LoadScripts ( ICollection scriptFileList ) : int

Loads scripts from collection.

Method Details

DisposeScripts() protected méthode

Disposes all disposable scripts and clears internal script list.
protected DisposeScripts ( ) : void
Résultat void

GetAssembly() protected méthode

Loads assembly for script, compiles it if necessary. Returns null if there was a problem.
protected GetAssembly ( string path ) : Assembly
path string
Résultat System.Reflection.Assembly

GetCachePath() protected méthode

Returns path for the compiled version of the script. Creates directory structure if it doesn't exist.
protected GetCachePath ( string path ) : string
path string
Résultat string

GetJITtedTypes() protected static méthode

TODO: We might want to stop loading if this is a problem, scripts might depend on each other, which could lead to more errors.
protected static GetJITtedTypes ( Assembly asm, string filePath ) : IEnumerable
asm System.Reflection.Assembly
filePath string
Résultat IEnumerable

GetScriptType() public méthode

Returns the type of the script with the given name.
public GetScriptType ( string typeName ) : Type
typeName string
Résultat System.Type

LoadScripts() public méthode

Loads scripts from list file.
public LoadScripts ( string scriptListFile ) : void
scriptListFile string Text file containing paths to script files.
Résultat void

ReadScriptList() protected méthode

Returns list of script files loaded from scripts.txt.
protected ReadScriptList ( string scriptListFile ) : List
scriptListFile string
Résultat List

ScriptManager() public méthode

Creates new script manager.
public ScriptManager ( ) : Aura.Data
Résultat Aura.Data

Property Details

_compilers protected_oe property

protected Dictionary _compilers
Résultat Compiler>.Dictionary

_scripts protected_oe property

protected Dictionary _scripts
Résultat Type>.Dictionary

_scriptsToDispose protected_oe property

protected List _scriptsToDispose
Résultat List