public void DownloadFileAsync(Uri uri, string customSavePath = null) { this.Filename = customSavePath ?? Filename; this.ProgressPercentage = 0; Wrapped.DownloadProgressChanged += (s, e) => OnDownloadProgressChanged(e); Wrapped.DownloadFileCompleted += (s, e) => OnDownloadFileCompleted(e); Wrapped.DownloadFileAsync(uri, this.Filename); Status = RangeWebClientStatus.Running; }
public void Dispose() { if (this.Wrapped != null) { this.Wrapped.Dispose(); } this.Filename = null; this.From = null; this.To = null; this.ProgressPercentage = 0; this.Status = RangeWebClientStatus.Disposed; }