C# Class Nexus.Client.ModManagement.ModRegistry

A registry of all mods being managed by the mod manager.
Show file Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
DiscoverManagedMods ( IModFormatRegistry p_frgFormatRegistry, IModCacheManager p_frgCacheManager, string p_strSearchPath, bool p_booRecurse, IGameMode p_gmdGameMode ) : ModRegistry

Searches for mods in the specified path, and loads any mods that are found into a registry.

GetMod ( string p_strModPath ) : IMod

Returns the mod registered with the given path.

ModRegistry ( IModFormatRegistry p_frgFormatRegistry, IGameMode p_gmdGameMode ) : System

A simple constructor that initializes the object with its dependencies.

RegisterMod ( string p_strModPath ) : IMod

Registers the specified mod.

RegisterMod ( string p_strModPath, IModInfo p_mifTagInfo ) : IMod

Registers the specified mod, tagging it with the given info.

UnregisterMod ( IMod p_modMod ) : void

Removes the specified mod from the registry.

Protected Methods

Method Description
CreateMod ( string p_strModPath, string p_strCachePath, IGameMode p_gmdGameMode ) : IMod

Creates a mod of the appropriate type from the specified file.

Method Details

CreateMod() protected method

Creates a mod of the appropriate type from the specified file.
protected CreateMod ( string p_strModPath, string p_strCachePath, IGameMode p_gmdGameMode ) : IMod
p_strModPath string The path to the mod file.
p_strCachePath string The path to the cache file.
p_gmdGameMode IGameMode The game mode for which to create the plugin.
return IMod

DiscoverManagedMods() public static method

Searches for mods in the specified path, and loads any mods that are found into a registry.
public static DiscoverManagedMods ( IModFormatRegistry p_frgFormatRegistry, IModCacheManager p_frgCacheManager, string p_strSearchPath, bool p_booRecurse, IGameMode p_gmdGameMode ) : ModRegistry
p_frgFormatRegistry IModFormatRegistry The that contains the list /// of supported s.
p_frgCacheManager IModCacheManager
p_strSearchPath string The path in which to search for mod format assemblies.
p_booRecurse bool Whether to check sub folders of for mods.
p_gmdGameMode IGameMode The game mode for which to discover mods.
return ModRegistry

GetMod() public method

Returns the mod registered with the given path.
public GetMod ( string p_strModPath ) : IMod
p_strModPath string The path of the mod to return
return IMod

ModRegistry() public method

A simple constructor that initializes the object with its dependencies.
public ModRegistry ( IModFormatRegistry p_frgFormatRegistry, IGameMode p_gmdGameMode ) : System
p_frgFormatRegistry IModFormatRegistry The that contains the list /// of supported s.
p_gmdGameMode IGameMode The for which mods are to be registered.
return System

RegisterMod() public method

Registers the specified mod.
public RegisterMod ( string p_strModPath ) : IMod
p_strModPath string The path to the mod to register.
return IMod

RegisterMod() public method

Registers the specified mod, tagging it with the given info.
public RegisterMod ( string p_strModPath, IModInfo p_mifTagInfo ) : IMod
p_strModPath string The path to the mod to register.
p_mifTagInfo IModInfo The info with which to tag the mod.
return IMod

UnregisterMod() public method

Removes the specified mod from the registry.
public UnregisterMod ( IMod p_modMod ) : void
p_modMod IMod The mod to unregister.
return void