BiliRanking.Core.Download.MultiThreadedWebDownloader.client_DownloadCompleted C# (CSharp) Method

client_DownloadCompleted() static private method

Handle the DownloadCompleted event of all the HttpDownloadClients.
static private client_DownloadCompleted ( object sender, DownloadCompletedEventArgs e ) : void
sender object
e DownloadCompletedEventArgs
return void
        void client_DownloadCompleted(object sender, DownloadCompletedEventArgs e)
        {
            if (e.Error != null
                && this.Status != DownloadStatus.Canceling
                && this.Status != DownloadStatus.Canceled)
            {
                this.Cancel();
                this.OnDownloadCompleted(new DownloadCompletedEventArgs(
                    null,
                    this.DownloadedSize,
                    this.TotalSize,
                    this.TotalUsedTime,
                    e.Error));
            }
        }