C# Класс Aura.Shared.Scripting.ScriptManager

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_compilers Compiler>.Dictionary
_scripts Type>.Dictionary
_scriptsToDispose List

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

DisposeScripts() защищенный Метод

Disposes all disposable scripts and clears internal script list.
protected DisposeScripts ( ) : void
Результат void

GetAssembly() защищенный Метод

Loads assembly for script, compiles it if necessary. Returns null if there was a problem.
protected GetAssembly ( string path ) : Assembly
path string
Результат System.Reflection.Assembly

GetCachePath() защищенный Метод

Returns path for the compiled version of the script. Creates directory structure if it doesn't exist.
protected GetCachePath ( string path ) : string
path string
Результат string

GetJITtedTypes() защищенный статический Метод

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
Результат IEnumerable

GetScriptType() публичный Метод

Returns the type of the script with the given name.
public GetScriptType ( string typeName ) : Type
typeName string
Результат System.Type

LoadScripts() публичный Метод

Loads scripts from list file.
public LoadScripts ( string scriptListFile ) : void
scriptListFile string Text file containing paths to script files.
Результат void

ReadScriptList() защищенный Метод

Returns list of script files loaded from scripts.txt.
protected ReadScriptList ( string scriptListFile ) : List
scriptListFile string
Результат List

ScriptManager() публичный Метод

Creates new script manager.
public ScriptManager ( ) : Aura.Data
Результат Aura.Data

Описание свойств

_compilers защищенное свойство

protected Dictionary _compilers
Результат Compiler>.Dictionary

_scripts защищенное свойство

protected Dictionary _scripts
Результат Type>.Dictionary

_scriptsToDispose защищенное свойство

protected List _scriptsToDispose
Результат List