public DownloadTask(Downloader downloader, Uri url, Action<DownloadResult> callback, DownloadOptions options, string key, DownloadResult result) { this.downloader = downloader; this.Url = url; this.Callback = callback; this.Options = options; this.Key = key; this.Result = result; }
private void Dispose(bool disposing) { if (!this.disposed) { if (disposing) { lock (this.syncRoot) { this.started = false; this.finished = true; if (this.webClient != null) { this.webClient.Dispose(); this.webClient = null; } } } this.downloader = null; this.disposed = true; } }