C# 클래스 Nexus.Client.ModManagement.ModManager

The class the encapsulates managing mods.
The list of managed mods needs to be centralized to ensure integrity; having multiple mod managers, each with a potentially different list of managed mods, would be disastrous. As such, this object is a singleton to help enforce that policy. Note, however, that the singleton nature of the manager 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.
파일 보기 프로젝트 열기: NexusMods/NexusModManager-4.5 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
IsBackupActive bool
LoginTask LoginFormTask
lstMBInfo List

공개 메소드들

메소드 설명
ActivateMod ( IMod p_modMod, ConfirmModUpgradeDelegate p_dlgUpgradeConfirmationDelegate, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate, ReadOnlyObservableList p_rolActiveMods ) : IBackgroundTaskSet

Activates the given mod.

AddMod ( string p_strPath, ConfirmOverwriteCallback p_cocConfirmOverwrite ) : IBackgroundTask

Installs the specified mod.

AsyncAddMod ( Uri p_uriPath, ConfirmOverwriteCallback p_cocConfirmOverwrite ) : IBackgroundTask
AsyncAddModTask ( IBackgroundTask p_tskAddModTask ) : void
AsyncEndorseMod ( IMod p_modMod ) : void

Async toggle of the endorsement for the given mod.

AsyncTagMod ( ModManagement p_ModManagerVM, ModManagement p_ModTaggerVM, EventHandler p_TaggingMod ) : void
AsyncUpdateMods ( List p_lstModList, ConfirmActionMethod p_camConfirm, bool p_booOverrideCategorySetup ) : void

Runs the managed updaters.

AsyncUpdateModsTask ( ModUpdateCheckTask p_mutModUpdateCheck, ConfirmActionMethod p_camConfirm ) : Task
DeactivateMod ( IMod p_modMod, ReadOnlyObservableList p_rolActiveMods ) : IBackgroundTaskSet

deactivates the given mod.

DeactivateMultipleMods ( ReadOnlyObservableList p_rolModList, ConfirmActionMethod p_camConfirm ) : IBackgroundTask

Runs the managed updaters.

DeleteMod ( IMod p_modMod, ReadOnlyObservableList p_rolActiveMods ) : IBackgroundTaskSet

Deletes the given mod.

The mod is deactivated, unregistered, and then deleted.

ForceUpgrade ( IMod p_modOldMod, IMod p_modNewMod, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate ) : IBackgroundTaskSet

Forces an upgrade from one mod to another.

No checks as to whether the two mods are actually related are performed. The new mod is reactivated as if it were the old mod, and the old mod is replaced by the new mod.

GetModTagger ( ) : AutoTagger

Gets the tagger to use to tag mods with metadata.

Initialize ( IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IModRepository p_mrpModRepository, DownloadMonitor p_dmrMonitor, ActivateModsMonitor p_ammMonitor, IModFormatRegistry p_frgFormatRegistry, ModRegistry p_mrgModRegistry, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager ) : ModManager

Initializes the singleton intances of the mod manager.

LoadQueuedMods ( ) : void

Loads the list of mods that are queued to be added to the mod manager.

Login ( ) : bool

Logins the user into the current mod repository.

Logout ( ) : void
ReactivateMod ( IMod p_modMod, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate ) : IBackgroundTaskSet

Reactivates the given mod.

A reactivation is an upgrade of a mod to itself. It re-runs the activation, without changing the installed precedence of its files and installed values.

Release ( ) : void

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

SetupReadMeManager ( List p_lstModList, ConfirmActionMethod p_camConfirm ) : IBackgroundTask

Runs the managed updaters.

SwitchModCategory ( IMod p_modMod, Int32 p_intCategoryId ) : void

Switches the mod category.

ToggleModEndorsement ( IMod p_modMod ) : void

Toggles the endorsement for the given mod.

ToggleUpdateWarningTask ( HashSet p_hashMods, bool p_booEnable, ConfirmActionMethod p_camConfirm ) : IBackgroundTask

Runs the managed updaters.

UpdateMods ( List p_lstModList, ConfirmActionMethod p_camConfirm, bool p_booOverrideCategorySetup ) : IBackgroundTask

Runs the managed updaters.

비공개 메소드들

메소드 설명
Deactivator_TaskSetCompleted ( object sender, TaskSetCompletedEventArgs e ) : void

Handles the IBackgroundTaskSet.TaskSetCompleted event of the mod deletion mod deativator.

DeleteXMLInstalledFile ( IMod p_modMod ) : void

If the mod is scripted, deletes the XMLInstalledFiles file inside the InstallInfo\Scripted folder.

ModManager ( IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IModRepository p_mrpModRepository, DownloadMonitor p_dmrMonitor, ActivateModsMonitor p_ammMonitor, IModFormatRegistry p_frgFormatRegistry, ModRegistry p_mdrManagedModRegistry, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager ) : System

A simple constructor that initializes the object with its dependencies.

메소드 상세

ActivateMod() 공개 메소드

Activates the given mod.
public ActivateMod ( IMod p_modMod, ConfirmModUpgradeDelegate p_dlgUpgradeConfirmationDelegate, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate, ReadOnlyObservableList p_rolActiveMods ) : IBackgroundTaskSet
p_modMod IMod The mod to activate.
p_dlgUpgradeConfirmationDelegate ConfirmModUpgradeDelegate The delegate that is called to confirm whether an upgrade install should be performed.
p_dlgOverwriteConfirmationDelegate ConfirmItemOverwriteDelegate The method to call in order to confirm an overwrite.
p_rolActiveMods ReadOnlyObservableList The list or Active mods.
리턴 IBackgroundTaskSet

AddMod() 공개 메소드

Installs the specified mod.
public AddMod ( string p_strPath, ConfirmOverwriteCallback p_cocConfirmOverwrite ) : IBackgroundTask
p_strPath string The path to the mod to install.
p_cocConfirmOverwrite ConfirmOverwriteCallback The delegate to call to resolve conflicts with existing files.
리턴 IBackgroundTask

AsyncAddMod() 공개 메소드

public AsyncAddMod ( Uri p_uriPath, ConfirmOverwriteCallback p_cocConfirmOverwrite ) : IBackgroundTask
p_uriPath System.Uri
p_cocConfirmOverwrite ConfirmOverwriteCallback
리턴 IBackgroundTask

AsyncAddModTask() 공개 메소드

public AsyncAddModTask ( IBackgroundTask p_tskAddModTask ) : void
p_tskAddModTask IBackgroundTask
리턴 void

AsyncEndorseMod() 공개 메소드

Async toggle of the endorsement for the given mod.
public AsyncEndorseMod ( IMod p_modMod ) : void
p_modMod IMod The mod to endorse/unendorse.
리턴 void

AsyncTagMod() 공개 메소드

public AsyncTagMod ( ModManagement p_ModManagerVM, ModManagement p_ModTaggerVM, EventHandler p_TaggingMod ) : void
p_ModManagerVM ModManagement
p_ModTaggerVM ModManagement
p_TaggingMod EventHandler
리턴 void

AsyncUpdateMods() 공개 메소드

Runs the managed updaters.
public AsyncUpdateMods ( List p_lstModList, ConfirmActionMethod p_camConfirm, bool p_booOverrideCategorySetup ) : void
p_lstModList List The list of mods we need to update.
p_camConfirm ConfirmActionMethod The delegate to call to confirm an action.
p_booOverrideCategorySetup bool Whether to force a global update.
리턴 void

AsyncUpdateModsTask() 공개 메소드

public AsyncUpdateModsTask ( ModUpdateCheckTask p_mutModUpdateCheck, ConfirmActionMethod p_camConfirm ) : Task
p_mutModUpdateCheck ModUpdateCheckTask
p_camConfirm ConfirmActionMethod
리턴 Task

DeactivateMod() 공개 메소드

deactivates the given mod.
public DeactivateMod ( IMod p_modMod, ReadOnlyObservableList p_rolActiveMods ) : IBackgroundTaskSet
p_modMod IMod The mod to deactivate.
p_rolActiveMods ReadOnlyObservableList The list of active mods.
리턴 IBackgroundTaskSet

DeactivateMultipleMods() 공개 메소드

Runs the managed updaters.
public DeactivateMultipleMods ( ReadOnlyObservableList p_rolModList, ConfirmActionMethod p_camConfirm ) : IBackgroundTask
p_rolModList ReadOnlyObservableList The mod list.
p_camConfirm ConfirmActionMethod The delegate to call to confirm an action.
리턴 IBackgroundTask

DeleteMod() 공개 메소드

Deletes the given mod.
The mod is deactivated, unregistered, and then deleted.
public DeleteMod ( IMod p_modMod, ReadOnlyObservableList p_rolActiveMods ) : IBackgroundTaskSet
p_modMod IMod The mod to delete.
p_rolActiveMods ReadOnlyObservableList The list of active mods.
리턴 IBackgroundTaskSet

ForceUpgrade() 공개 메소드

Forces an upgrade from one mod to another.
No checks as to whether the two mods are actually related are performed. The new mod is reactivated as if it were the old mod, and the old mod is replaced by the new mod.
public ForceUpgrade ( IMod p_modOldMod, IMod p_modNewMod, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate ) : IBackgroundTaskSet
p_modOldMod IMod The mod from which to upgrade.
p_modNewMod IMod The mod to which to upgrade.
p_dlgOverwriteConfirmationDelegate ConfirmItemOverwriteDelegate The method to call in order to confirm an overwrite.
리턴 IBackgroundTaskSet

GetModTagger() 공개 메소드

Gets the tagger to use to tag mods with metadata.
public GetModTagger ( ) : AutoTagger
리턴 AutoTagger

Initialize() 공개 정적인 메소드

Initializes the singleton intances of the mod manager.
Thrown if the mod manager has already /// been initialized.
public static Initialize ( IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IModRepository p_mrpModRepository, DownloadMonitor p_dmrMonitor, ActivateModsMonitor p_ammMonitor, IModFormatRegistry p_frgFormatRegistry, ModRegistry p_mrgModRegistry, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager ) : ModManager
p_gmdGameMode IGameMode The current game mode.
p_eifEnvironmentInfo IEnvironmentInfo The application's envrionment info.
p_mrpModRepository IModRepository The mod repository from which to get mods and mod metadata.
p_dmrMonitor Nexus.Client.DownloadMonitoring.DownloadMonitor The download monitor to use to track task progress.
p_ammMonitor Nexus.Client.ActivateModsMonitoring.ActivateModsMonitor
p_frgFormatRegistry IModFormatRegistry The that contains the list /// of supported s.
p_mrgModRegistry ModRegistry The that contains the list /// of managed s.
p_futFileUtility Nexus.Client.Util.FileUtil The file utility class.
p_scxUIContext System.Threading.SynchronizationContext The to use to marshall UI interactions to the UI thread.
p_ilgInstallLog IInstallLog The install log tracking mod activations for the current game mode.
p_pmgPluginManager IPluginManager The plugin manager to use to work with plugins.
리턴 ModManager

LoadQueuedMods() 공개 메소드

Loads the list of mods that are queued to be added to the mod manager.
public LoadQueuedMods ( ) : void
리턴 void

Login() 공개 메소드

Logins the user into the current mod repository.
public Login ( ) : bool
리턴 bool

Logout() 공개 메소드

public Logout ( ) : void
리턴 void

ReactivateMod() 공개 메소드

Reactivates the given mod.
A reactivation is an upgrade of a mod to itself. It re-runs the activation, without changing the installed precedence of its files and installed values.
public ReactivateMod ( IMod p_modMod, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate ) : IBackgroundTaskSet
p_modMod IMod The mod to reactivate.
p_dlgOverwriteConfirmationDelegate ConfirmItemOverwriteDelegate The method to call in order to confirm an overwrite.
리턴 IBackgroundTaskSet

Release() 공개 메소드

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

SetupReadMeManager() 공개 메소드

Runs the managed updaters.
public SetupReadMeManager ( List p_lstModList, ConfirmActionMethod p_camConfirm ) : IBackgroundTask
p_lstModList List The mod list.
p_camConfirm ConfirmActionMethod The delegate to call to confirm an action.
리턴 IBackgroundTask

SwitchModCategory() 공개 메소드

Switches the mod category.
public SwitchModCategory ( IMod p_modMod, Int32 p_intCategoryId ) : void
p_modMod IMod The mod.
p_intCategoryId System.Int32 The new category id.
리턴 void

ToggleModEndorsement() 공개 메소드

Toggles the endorsement for the given mod.
public ToggleModEndorsement ( IMod p_modMod ) : void
p_modMod IMod The mod to endorse/unendorse.
리턴 void

ToggleUpdateWarningTask() 공개 메소드

Runs the managed updaters.
public ToggleUpdateWarningTask ( HashSet p_hashMods, bool p_booEnable, ConfirmActionMethod p_camConfirm ) : IBackgroundTask
p_hashMods HashSet The hash of mods.
p_booEnable bool Enable/Disable/Toggle.
p_camConfirm ConfirmActionMethod The delegate to call to confirm an action.
리턴 IBackgroundTask

UpdateMods() 공개 메소드

Runs the managed updaters.
public UpdateMods ( List p_lstModList, ConfirmActionMethod p_camConfirm, bool p_booOverrideCategorySetup ) : IBackgroundTask
p_lstModList List The list of mods we need to update.
p_camConfirm ConfirmActionMethod The delegate to call to confirm an action.
p_booOverrideCategorySetup bool Whether to force a global update.
리턴 IBackgroundTask

프로퍼티 상세

IsBackupActive 공개적으로 프로퍼티

public bool IsBackupActive
리턴 bool

LoginTask 공개적으로 프로퍼티

The loginform Task.
public LoginFormTask LoginTask
리턴 LoginFormTask

lstMBInfo 공개적으로 프로퍼티

public List lstMBInfo
리턴 List