C# Class Nexus.Client.ModManagement.ModInstallerBase

The base class for all mod installers.
Inheritance: IBackgroundTaskSet
Show file Open project: NexusMods/NexusModManager-4.5

Protected Properties

Property Type Description
objInstallLock object
objUninstallLock object

Public Methods

Method Description
ModInstallerBase ( ) : System

The default constructor.

Wait ( ) : void

Blocks until the task set is completed.

Protected Methods

Method Description
OnTaskSetCompleted ( TaskSetCompletedEventArgs e ) : void

Raises the TaskSetCompleted event.

The event is raised asynchronously, so the installer can continue its work uninterrupted. This is to prevent deadlocks, primarily on the UI thread.

OnTaskSetCompleted ( bool p_booSuccess, string p_strMessage, IMod p_modMod ) : void

Raises the TaskSetCompleted event.

OnTaskStarted ( EventArgs e ) : void

Raises the TaskStarted event.

The event is raised asynchronously, so the installer can continue its work uninterrupted. This is to prevent deadlocks, primarily on the UI thread.

OnTaskStarted ( IBackgroundTask p_bgtTask ) : void

Raises the TaskStarted event.

Private Methods

Method Description
EndTaskSetCompletedCallback ( IAsyncResult p_asrResult ) : void

The callback called by the begin invoke method used to call the event asynchronously upon completion of the event.

EndTaskStartedCallback ( IAsyncResult p_asrResult ) : void

The callback called by the begin invoke method used to call the event asynchronously upon completion of the event.

RaiseTaskSetCompleted ( TaskSetCompletedEventArgs e ) : void

Raises the TaskSetCompleted event.

RaiseTaskStarted ( EventArgs e ) : void

Raises the TaskStarted event.

Method Details

ModInstallerBase() public method

The default constructor.
public ModInstallerBase ( ) : System
return System

OnTaskSetCompleted() protected method

Raises the TaskSetCompleted event.
The event is raised asynchronously, so the installer can continue its work uninterrupted. This is to prevent deadlocks, primarily on the UI thread.
protected OnTaskSetCompleted ( TaskSetCompletedEventArgs e ) : void
e Nexus.Client.BackgroundTasks.TaskSetCompletedEventArgs A describing the task that was started.
return void

OnTaskSetCompleted() protected method

Raises the TaskSetCompleted event.
protected OnTaskSetCompleted ( bool p_booSuccess, string p_strMessage, IMod p_modMod ) : void
p_booSuccess bool Whether or not the task set completed successfully.
p_strMessage string The message of the completed task set.
p_modMod IMod The mod the installer acted upon.
return void

OnTaskStarted() protected method

Raises the TaskStarted event.
The event is raised asynchronously, so the installer can continue its work uninterrupted. This is to prevent deadlocks, primarily on the UI thread.
protected OnTaskStarted ( EventArgs e ) : void
e EventArgs An describing the task that was started.
return void

OnTaskStarted() protected method

Raises the TaskStarted event.
protected OnTaskStarted ( IBackgroundTask p_bgtTask ) : void
p_bgtTask IBackgroundTask The task that was started.
return void

Wait() public method

Blocks until the task set is completed.
public Wait ( ) : void
return void

Property Details

objInstallLock protected static property

We only want on installer running at a time, so as not to mess up the file system, of settings files. As such, all installers lock on this lock object.
protected static object objInstallLock
return object

objUninstallLock protected static property

We only want on uninstaller running at a time, so as not to mess up the file system, of settings files. As such, all uninstaller lock on this lock object.
protected static object objUninstallLock
return object