C# Class NijieDownloader.UI.JobRunner

Inheritance: INotifyPropertyChanged
Mostra file Open project: Nandaka/NijieDownloader Class Usage Examples

Public Methods

Method Description
Clear ( ) : bool
ClearCompleted ( ) : bool
DeleteJob ( JobDownloadViewModel job ) : bool
DoJob ( JobDownloadViewModel job, CancellationTokenSource cancelSource ) : void

Run job on Task factory

JobRunner ( ) : System

Init the JobRunner, changes on these settings require app restart: - ConcurrentJob

NotifyAllCompleted ( System.Action action ) : void

Notify all task completed callback

Private Methods

Method Description
HandleJobException ( JobDownloadViewModel job, NijieException ne ) : void
SaveImageToDB ( JobDownloadViewModel job, NijieImage image ) : void
addException ( JobDownloadViewModel job, NijieException nex, string url, string filename ) : void
doImageJob ( JobDownloadViewModel job ) : void

Process individual image.

doMemberJob ( JobDownloadViewModel job ) : void

Process images from member page.

doSearchJob ( JobDownloadViewModel job ) : void

Process images from search result.

downloadUrl ( JobDownloadViewModel job, string url, string referer, string filename ) : int

Download the image to the specified filename from the Job.

isJobCancelled ( JobDownloadViewModel job ) : bool
processIllustration ( JobDownloadViewModel job, NijieImage image ) : void
processImage ( JobDownloadViewModel job, NijieMember memberPage, NijieImage imageTemp ) : void

Parse the image page - Illustration - Manga

processManga ( JobDownloadViewModel job, NijieImage image ) : void

Method Details

Clear() public method

public Clear ( ) : bool
return bool

ClearCompleted() public method

public ClearCompleted ( ) : bool
return bool

DeleteJob() public method

public DeleteJob ( JobDownloadViewModel job ) : bool
job NijieDownloader.UI.ViewModel.JobDownloadViewModel
return bool

DoJob() public method

Run job on Task factory
public DoJob ( JobDownloadViewModel job, CancellationTokenSource cancelSource ) : void
job NijieDownloader.UI.ViewModel.JobDownloadViewModel
cancelSource System.Threading.CancellationTokenSource
return void

JobRunner() public method

Init the JobRunner, changes on these settings require app restart: - ConcurrentJob
public JobRunner ( ) : System
return System

NotifyAllCompleted() public method

Notify all task completed callback
public NotifyAllCompleted ( System.Action action ) : void
action System.Action
return void