C# 클래스 Nexus.Client.DownloadManagement.FileDownloadTask

Downloads a file.
상속: BackgroundTask, IDisposable
파일 보기 프로젝트 열기: NexusMods/NexusModManager-4.5 1 사용 예제들

공개 메소드들

메소드 설명
Cancel ( ) : void

Cancels the task.

Dispose ( ) : void

Halts the file download.

After being disposed, that is no guarantee that the task's status will be correct. Further interaction with the object is undefined.

Download ( Uri p_uriURL, string>.Dictionary p_dicCookies, string p_strSavePath, bool p_booUseDefaultFileName ) : void

Downloads the speificed file to the specified location.

This method starts the download, and waits for it to end. If the given p_strSavePath already exists, an attempt will be made to resume the download. If the pre-existing file is not a partial download, or the download cannot be resumed, the file will be overwritten.

DownloadAsync ( List p_uriURL, string>.Dictionary p_dicCookies, string p_strSavePath, bool p_booUseDefaultFileName ) : void

Downloads the speificed file to the specified location.

This method starts the download and returns. If the given p_strSavePath already exists, an attempt will be made to resume the download. If the pre-existing file is not a partial download, or the download cannot be resumed, the file will be overwritten.

DownloadAsync ( Uri p_uriURL, string>.Dictionary p_dicCookies, string p_strSavePath, bool p_booUseDefaultFileName ) : void

Downloads the speificed file to the specified location.

This method starts the download and returns. If the given p_strSavePath already exists, an attempt will be made to resume the download. If the pre-existing file is not a partial download, or the download cannot be resumed, the file will be overwritten.

FileDownloadTask ( IModRepository p_mmrModRepository, Int32 p_intMaxConnections, Int32 p_intMinBlockSize, string p_strUserAgent ) : System

A simple constructor that initializes the object with the given values.

Pause ( ) : void

Pauses the task.

Queue ( ) : void

Queues the task.

Resume ( ) : void

Resumes the task.

비공개 메소드들

메소드 설명
Downloader_DownloadComplete ( object sender, CompletedDownloadEventArgs e ) : void

Handles the FileDownloader.DownloadComplete event of the file downloader.

This stops the updating of the progress properties.

Updater_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void

Handles the System.Timers.Timer.Elapsed event of the time that controls the updating of the progress properties.

This updates the progress properties.

메소드 상세

Cancel() 공개 메소드

Cancels the task.
public Cancel ( ) : void
리턴 void

Dispose() 공개 메소드

Halts the file download.
After being disposed, that is no guarantee that the task's status will be correct. Further interaction with the object is undefined.
public Dispose ( ) : void
리턴 void

Download() 공개 메소드

Downloads the speificed file to the specified location.
This method starts the download, and waits for it to end. If the given p_strSavePath already exists, an attempt will be made to resume the download. If the pre-existing file is not a partial download, or the download cannot be resumed, the file will be overwritten.
public Download ( Uri p_uriURL, string>.Dictionary p_dicCookies, string p_strSavePath, bool p_booUseDefaultFileName ) : void
p_uriURL System.Uri The URL of the file to download.
p_dicCookies string>.Dictionary A list of cookies that should be sent in the request to download the file.
p_strSavePath string The path to which to save the file. /// If is false, this value should be a complete /// path, including filename. If is true, /// this value should be the directory in which to save the file.
p_booUseDefaultFileName bool Whether to use the file name suggested by the server.
리턴 void

DownloadAsync() 공개 메소드

Downloads the speificed file to the specified location.
This method starts the download and returns. If the given p_strSavePath already exists, an attempt will be made to resume the download. If the pre-existing file is not a partial download, or the download cannot be resumed, the file will be overwritten.
public DownloadAsync ( List p_uriURL, string>.Dictionary p_dicCookies, string p_strSavePath, bool p_booUseDefaultFileName ) : void
p_uriURL List The URL list of the file to download.
p_dicCookies string>.Dictionary A list of cookies that should be sent in the request to download the file.
p_strSavePath string The path to which to save the file. /// If is false, this value should be a complete /// path, including filename. If is true, /// this value should be the directory in which to save the file.
p_booUseDefaultFileName bool Whether to use the file name suggested by the server.
리턴 void

DownloadAsync() 공개 메소드

Downloads the speificed file to the specified location.
This method starts the download and returns. If the given p_strSavePath already exists, an attempt will be made to resume the download. If the pre-existing file is not a partial download, or the download cannot be resumed, the file will be overwritten.
public DownloadAsync ( Uri p_uriURL, string>.Dictionary p_dicCookies, string p_strSavePath, bool p_booUseDefaultFileName ) : void
p_uriURL System.Uri The URL of the file to download.
p_dicCookies string>.Dictionary A list of cookies that should be sent in the request to download the file.
p_strSavePath string The path to which to save the file. /// If is false, this value should be a complete /// path, including filename. If is true, /// this value should be the directory in which to save the file.
p_booUseDefaultFileName bool Whether to use the file name suggested by the server.
리턴 void

FileDownloadTask() 공개 메소드

A simple constructor that initializes the object with the given values.
public FileDownloadTask ( IModRepository p_mmrModRepository, Int32 p_intMaxConnections, Int32 p_intMinBlockSize, string p_strUserAgent ) : System
p_mmrModRepository IModRepository
p_intMaxConnections System.Int32 The maximum number of connections to use to download the file.
p_intMinBlockSize System.Int32 The minimum block size that should be downloaded at once. This should /// ideally be some mulitple of the available bandwidth.
p_strUserAgent string The current User Agent.
리턴 System

Pause() 공개 메소드

Pauses the task.
Thrown if the task does not support pausing.
public Pause ( ) : void
리턴 void

Queue() 공개 메소드

Queues the task.
Thrown if the task does not support queuing.
public Queue ( ) : void
리턴 void

Resume() 공개 메소드

Resumes the task.
Thrown if the task is not paused.
public Resume ( ) : void
리턴 void