C# Class Nexus.Client.PluginManagement.PluginRegistry

A registry of all plugins being managed by the plugin manager.
显示文件 Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
DiscoverManagedPlugins ( IPluginFactory p_pftFactory, IPluginDiscoverer p_pdvDiscoverer ) : PluginRegistry

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

GetPlugin ( string p_strPluginPath ) : Plugin

Returns the plugin registered with the given path.

IsActivatiblePluginFile ( string p_strPath ) : bool

Determines if the specified file is a plugin that can be activated for the game mode.

PluginRegistry ( IPluginFactory p_pgfPluginFactory ) : System.Collections.Generic

A simple constructor that initializes the object with its dependencies.

RegisterPlugin ( string p_strPluginPath ) : bool

Registers the specified plugin.

UnregisterPlugin ( Plugin p_plgPlugin ) : void

Removes the given plugin from the registry.

UnregisterPlugin ( string p_strPluginPath ) : void

Removes the specified plugin from the registry.

Private Methods

Method Description
GetEnlistment ( ) : TransactionEnlistment

Gets an enlistment into the ambient transaction, if one exists.

Method Details

DiscoverManagedPlugins() public static method

Searches for plugins in the specified path, and loads any plugins that are found into a registry.
public static DiscoverManagedPlugins ( IPluginFactory p_pftFactory, IPluginDiscoverer p_pdvDiscoverer ) : PluginRegistry
p_pftFactory IPluginFactory The factory to use to create s.
p_pdvDiscoverer IPluginDiscoverer The discoverer to use to search for plugins.
return PluginRegistry

GetPlugin() public method

Returns the plugin registered with the given path.
public GetPlugin ( string p_strPluginPath ) : Plugin
p_strPluginPath string The path of the plugin to return
return Nexus.Client.Plugins.Plugin

IsActivatiblePluginFile() public method

Determines if the specified file is a plugin that can be activated for the game mode.
public IsActivatiblePluginFile ( string p_strPath ) : bool
p_strPath string The path to the file for which it is to be determined if it is a plugin file.
return bool

PluginRegistry() public method

A simple constructor that initializes the object with its dependencies.
public PluginRegistry ( IPluginFactory p_pgfPluginFactory ) : System.Collections.Generic
p_pgfPluginFactory IPluginFactory The factory to use to create plugins.
return System.Collections.Generic

RegisterPlugin() public method

Registers the specified plugin.
public RegisterPlugin ( string p_strPluginPath ) : bool
p_strPluginPath string The path to the plugin to register.
return bool

UnregisterPlugin() public method

Removes the given plugin from the registry.
public UnregisterPlugin ( Plugin p_plgPlugin ) : void
p_plgPlugin Nexus.Client.Plugins.Plugin The plugin to unregister.
return void

UnregisterPlugin() public method

Removes the specified plugin from the registry.
public UnregisterPlugin ( string p_strPluginPath ) : void
p_strPluginPath string The path to the plugin to unregister.
return void