C# Class Nexus.Client.PluginManagement.InstallationLog.ActivePluginLog

The log that tracks plugins that have been enabled.
The plugin log can only be accessed by one install task at a time, so this object is a singleton to help enforce that policy. Note, however, that the singleton nature of the log is not meant to provide global access to the object. As such, there is no static accessor to retrieve the singleton instance. Instead, the Initialize(PluginRegistry, IActivePluginLogSerializer) method returns the only instance that should be used.
ファイルを表示 Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
ActivatePlugin ( Plugin p_plgPlugin ) : void

Activates the given plugin.

ActivatePlugin ( string p_strPath ) : void

Activates the specified plugin.

DeactivatePlugin ( Plugin p_plgPlugin ) : void

Deactivates the given plugin.

DeactivatePlugin ( string p_strPath ) : void

Deactivates the specified plugin.

Initialize ( PluginRegistry p_mprManagedPluginRegistry, IActivePluginLogSerializer p_plsSerializer ) : ActivePluginLog

Initializes the plugin log.

IsPluginActive ( Plugin p_plgPlugin ) : bool

Determines if the given plugin is active.

Release ( ) : void

This disposes of the singleton object, allowing it to be re-initialized.

Protected Methods

Method Description
SavePluginLog ( ) : void

Save the data to the Install Log file.

Private Methods

Method Description
ActivePluginLog ( PluginRegistry p_mprManagedPluginRegistry, IActivePluginLogSerializer p_plsSerializer ) : System

A simple constructor that initializes the object with its dependencies.

GetEnlistment ( ) : TransactionEnlistment

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

LoadPluginLog ( ) : void

Loads the data from the Install Log file.

Method Details

ActivatePlugin() public method

Activates the given plugin.
public ActivatePlugin ( Plugin p_plgPlugin ) : void
p_plgPlugin Nexus.Client.Plugins.Plugin The plugin to activate.
return void

ActivatePlugin() public method

Activates the specified plugin.
public ActivatePlugin ( string p_strPath ) : void
p_strPath string The path to the plugin to activate.
return void

DeactivatePlugin() public method

Deactivates the given plugin.
public DeactivatePlugin ( Plugin p_plgPlugin ) : void
p_plgPlugin Nexus.Client.Plugins.Plugin The plugin to deactivate.
return void

DeactivatePlugin() public method

Deactivates the specified plugin.
public DeactivatePlugin ( string p_strPath ) : void
p_strPath string The path to the plugin to deactivate.
return void

Initialize() public static method

Initializes the plugin log.
Thrown if the plugins log has already /// been initialized.
public static Initialize ( PluginRegistry p_mprManagedPluginRegistry, IActivePluginLogSerializer p_plsSerializer ) : ActivePluginLog
p_mprManagedPluginRegistry PluginRegistry The that contains the list /// of managed s.
p_plsSerializer IActivePluginLogSerializer The object that serializes and deserializes /// data from an active plugin log permanent store.
return ActivePluginLog

IsPluginActive() public method

Determines if the given plugin is active.
public IsPluginActive ( Plugin p_plgPlugin ) : bool
p_plgPlugin Nexus.Client.Plugins.Plugin The plugin whose active state is to be determined.
return bool

Release() public method

This disposes of the singleton object, allowing it to be re-initialized.
public Release ( ) : void
return void

SavePluginLog() protected method

Save the data to the Install Log file.
protected SavePluginLog ( ) : void
return void