C# Класс Nexus.Client.ModManagement.Scripting.ScriptTypeRegistry

A registry of all supported mod script types.
Наследование: IScriptTypeRegistry
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
DiscoverScriptTypes ( string p_strSearchPath, IGameMode p_gmdGameMode ) : IScriptTypeRegistry

Searches for script type assemblies in the specified path, and loads any script types that are found into a registry.

A script type is loaded if the class implements IScriptType and is not abstract. Once loaded, the type is added to the registry.

GetType ( string p_strScriptTypeId ) : IScriptType

Gets the specified IScriptType.

RegisterType ( IScriptType p_stpType ) : void

Registers the given IScriptType.

ScriptTypeRegistry ( ) : System

The default constructor.

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

Метод Описание
CurrentDomain_AssemblyResolve ( object sender, ResolveEventArgs args ) : Assembly

Handles the AppDomain.AssemblyResolve event.

Assemblies that have been load dynamically aren't accessible by assembly name. So, when, for example, Fallout3.XmlScript.dll looks for the XmlScript.dll assembly on which it is dependent, it looks for "XmlScript" (the name of the assembly), but can't find it. This handler searches through loaded assemblies and finds the required assembly.

RegisterScriptTypes ( IScriptTypeRegistry p_stgScriptTypeRegistry, IEnumerable p_enmAssemblies ) : void

Searches the given list of assemblies for script types, and registers any that are found.

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

DiscoverScriptTypes() публичный статический Метод

Searches for script type assemblies in the specified path, and loads any script types that are found into a registry.
A script type is loaded if the class implements IScriptType and is not abstract. Once loaded, the type is added to the registry.
public static DiscoverScriptTypes ( string p_strSearchPath, IGameMode p_gmdGameMode ) : IScriptTypeRegistry
p_strSearchPath string The path in which to search for script type assemblies.
p_gmdGameMode IGameMode The current game mode.
Результат IScriptTypeRegistry

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

Gets the specified IScriptType.
public GetType ( string p_strScriptTypeId ) : IScriptType
p_strScriptTypeId string The id of the to retrieve.
Результат IScriptType

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

Registers the given IScriptType.
public RegisterType ( IScriptType p_stpType ) : void
p_stpType IScriptType A to register.
Результат void

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

The default constructor.
public ScriptTypeRegistry ( ) : System
Результат System