private void downloadCompleted(DownloadEventArgs args) { lock (this.monitor) { this.CloseFile(); } }
protected virtual void OnDownloadStopped(DownloadEventArgs args) { if (this.DownloadStopped != null) { this.DownloadStopped(args); } }
private void downloadCompleted(DownloadEventArgs args) { lock (this.monitor) { this.CloseDownload(); this.state = DownloadState.Finished; this.stopping = true; } this.OnDownloadCompleted(new DownloadEventArgs(this)); }
private void downloadCompleted(DownloadEventArgs args) { lock (this.monitor) { var resumingDownload = (ResumingDownload)args.Download; this.downloads.Remove(resumingDownload); } this.StartDownloadOfNextRange(); }