C# Class Nexus.Client.PluginManagement.OrderLog.PluginOrderLog

The log that tracks the order of plugins.
The plugin order 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 method returns the only instance that should be used.
Inheritance: IPluginOrderLog
Afficher le fichier Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Méthodes publiques

Méthode Description
Initialize ( PluginRegistry p_mprManagedPluginRegistry, IPluginOrderLogSerializer p_posOrderSerializer, IPluginOrderValidator p_povOrderValidator ) : PluginOrderLog

Initializes the plugin log.

Release ( ) : void

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

RemovePlugin ( Plugin p_plgPlugin ) : void

Removes the given plugin from the order list.

SetPluginOrder ( IList p_lstOrderedPlugins ) : void

Sets the order of the plugins to the given order.

If the given list does not include all registered plugins, then the plugins are ordered in a manner so as to not displace the positions of the plugins whose order was not specified.

SetPluginOrderIndex ( Plugin p_plgPlugin, int p_intNewIndex ) : void

Sets the load order of the specified plugin.

Méthodes protégées

Méthode Description
SavePluginLog ( ) : void

Save the data to the Install Log file.

Private Methods

Méthode Description
GetEnlistment ( ) : TransactionEnlistment

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

LoadPluginOrder ( ) : void

Loads the plugin order data from the permanent store.

PluginOrderLog ( PluginRegistry p_mprManagedPluginRegistry, IPluginOrderLogSerializer p_posOrderSerializer, IPluginOrderValidator p_povOrderValidator ) : System

A simple constructor that initializes the object with its dependencies.

Method Details

Initialize() public static méthode

Initializes the plugin log.
Thrown if the plugin order log has already /// been initialized.
public static Initialize ( PluginRegistry p_mprManagedPluginRegistry, IPluginOrderLogSerializer p_posOrderSerializer, IPluginOrderValidator p_povOrderValidator ) : PluginOrderLog
p_mprManagedPluginRegistry PluginRegistry The that contains the list /// of managed s.
p_posOrderSerializer IPluginOrderLogSerializer The object that serializes and deserializes /// data from an active plugin log permanent store.
p_povOrderValidator IPluginOrderValidator The object that validates plugin order.
Résultat PluginOrderLog

Release() public méthode

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

RemovePlugin() public méthode

Removes the given plugin from the order list.
public RemovePlugin ( Plugin p_plgPlugin ) : void
p_plgPlugin Nexus.Client.Plugins.Plugin The plugin to remove from the order list.
Résultat void

SavePluginLog() protected méthode

Save the data to the Install Log file.
protected SavePluginLog ( ) : void
Résultat void

SetPluginOrder() public méthode

Sets the order of the plugins to the given order.
If the given list does not include all registered plugins, then the plugins are ordered in a manner so as to not displace the positions of the plugins whose order was not specified.
public SetPluginOrder ( IList p_lstOrderedPlugins ) : void
p_lstOrderedPlugins IList The list indicating the desired order of the plugins.
Résultat void

SetPluginOrderIndex() public méthode

Sets the load order of the specified plugin.
public SetPluginOrderIndex ( Plugin p_plgPlugin, int p_intNewIndex ) : void
p_plgPlugin Nexus.Client.Plugins.Plugin The full path to the plugin file whose load order is to be set.
p_intNewIndex int The new load order index of the plugin.
Résultat void