Метод | Описание | |
---|---|---|
Cleanup ( ) : void |
Cleans up the meta files used while downloading.
|
|
FileDownloader ( |
A simple constructor that initializes the object with the given values. 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. |
|
StartDownload ( ) : void |
Starts the file download.
|
|
Stop ( ) : void |
Stops the file download.
|
Метод | Описание | |
---|---|---|
GetMetadata ( ) : |
Gets the file's metadata.
|
|
GetNextBlock ( ) : Range |
Gets the next block in the file that needs to be downloaded.
|
|
OnDownloadComplete ( |
Raises the DownloadComplete event. A completed download does not mean the entire file has been downloaded; the download may have been interrupted. |
|
OnDownloadComplete ( bool p_booGotEntireFile, string p_strSavedFileName ) : void |
Raises the DownloadComplete event. A completed download does not mean the entire file has been downloaded; the download may have been interrupted. |
Метод | Описание | |
---|---|---|
Downloader_FinishedDownloading ( object sender, |
Handles the BlockDownloader.FinishedDownloading events of the BlockDownloaders being used. This stops the file download once all the BlockDownloaders have finished. |
|
Initialize ( string p_strSavePath, bool p_booUseDefaultFileName ) : void |
Sets up the initial values of the downloader.
|
public FileDownloader ( |
||
p_uriURL | 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 |
p_booUseDefaultFileName | bool | Whether to use the file name suggested by the server. |
p_intMaxConnections | The maximum number of connections to use to download the file. | |
p_intMinBlockSize | 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 |
protected OnDownloadComplete ( |
||
e | A |
|
Результат | void |
protected OnDownloadComplete ( bool p_booGotEntireFile, string p_strSavedFileName ) : void | ||
p_booGotEntireFile | bool | Whether the entire file has been downloaded. |
p_strSavedFileName | string | The path to the downloaded file. |
Результат | void |