C# Class Nexus.Client.DownloadMonitoring.DownloadMonitor

This monitors the status of activities.
Inheritance: INotifyPropertyChanged
ファイルを表示 Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
AddActivity ( AddModTask p_tskTask ) : void

Adds a task to the monitor.

CanPause ( IBackgroundTask p_tskTask ) : bool

Determines if the given IBackgroundTask can be paused.

CanQueue ( IBackgroundTask p_tskTask ) : bool

Determines if the given IBackgroundTask can be paused.

CanRemove ( IBackgroundTask p_tskTask ) : bool

Determines if the given IBackgroundTask can be removed from the monitor.

CanResume ( IBackgroundTask p_tskTask ) : bool

Determines if the given IBackgroundTask can be resumed.

DownloadMonitor ( ) : System

The default constructor.

PauseDownload ( IBackgroundTask p_tskTask ) : void

Pauses a task.

QueueDownload ( IBackgroundTask p_tskTask ) : void

Pauses a task.

RemoveDownload ( AddModTask p_tskTask ) : void

Removes a task from the monitor.

Tasks can only be removed if they are not running.

ResumeDownload ( IBackgroundTask p_tskTask ) : void

Resumes a task.

Protected Methods

Method Description
OnPropertyChanged ( string name ) : void

Raises the INotifyPropertyChanged.PropertyChanged event of the project.

Private Methods

Method Description
Task_PropertyChanged ( object sender, PropertyChangedEventArgs e ) : void

Handles the INotifyPropertyChanged.PropertyChanged event of tasks.

This adds or removes tasks from the active task list as appropriate.

Method Details

AddActivity() public method

Adds a task to the monitor.
public AddActivity ( AddModTask p_tskTask ) : void
p_tskTask Nexus.Client.ModManagement.AddModTask The task to monitor.
return void

CanPause() public method

Determines if the given IBackgroundTask can be paused.
public CanPause ( IBackgroundTask p_tskTask ) : bool
p_tskTask IBackgroundTask The task for which it is to be determined /// if it can be paused.
return bool

CanQueue() public method

Determines if the given IBackgroundTask can be paused.
public CanQueue ( IBackgroundTask p_tskTask ) : bool
p_tskTask IBackgroundTask The task for which it is to be determined /// if it can be paused.
return bool

CanRemove() public method

Determines if the given IBackgroundTask can be removed from the monitor.
public CanRemove ( IBackgroundTask p_tskTask ) : bool
p_tskTask IBackgroundTask The task for which it is to be determined /// if it can be removed from the monitor.
return bool

CanResume() public method

Determines if the given IBackgroundTask can be resumed.
public CanResume ( IBackgroundTask p_tskTask ) : bool
p_tskTask IBackgroundTask The task for which it is to be determined /// if it can be resumed.
return bool

DownloadMonitor() public method

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

OnPropertyChanged() protected method

Raises the INotifyPropertyChanged.PropertyChanged event of the project.
protected OnPropertyChanged ( string name ) : void
name string The property name.
return void

PauseDownload() public method

Pauses a task.
public PauseDownload ( IBackgroundTask p_tskTask ) : void
p_tskTask IBackgroundTask The task to pause.
return void

QueueDownload() public method

Pauses a task.
public QueueDownload ( IBackgroundTask p_tskTask ) : void
p_tskTask IBackgroundTask The task to pause.
return void

RemoveDownload() public method

Removes a task from the monitor.
Tasks can only be removed if they are not running.
public RemoveDownload ( AddModTask p_tskTask ) : void
p_tskTask Nexus.Client.ModManagement.AddModTask The task to remove.
return void

ResumeDownload() public method

Resumes a task.
public ResumeDownload ( IBackgroundTask p_tskTask ) : void
p_tskTask IBackgroundTask The task to resume.
return void