Exemplo n.º 1
0
 protected virtual void OnDownloadCancelled(DownloadCancelledEventArgs args)
 {
     if (this.DownloadCancelled != null)
     {
         this.DownloadCancelled(args);
     }
 }
 private void downloadCancelled(DownloadCancelledEventArgs args)
 {
     lock (this.monitor)
     {
         this.CloseFile();
     }
 }
Exemplo n.º 3
0
        private void downloadCancelled(DownloadCancelledEventArgs args)
        {
            var download = args.Download;

            lock (this.monitor)
            {
                if (download == this.currentDownload)
                {
                    CountRetryAndCancelIfMaxRetriesReached();

                    if (this.currentDownload != null)
                    {
                        this.currentDownload = null;
                        StartThread(this.SleepThenBuildDownload, Thread.CurrentThread.Name + "-afterCancel");
                    }
                }
            }
        }
Exemplo n.º 4
0
 private void downloadCancelled(DownloadCancelledEventArgs args)
 {
     this.StartDownloadOfNextRange();
 }