public DownloadCheckResult CheckDownload(WebResponse response) { var result = new DownloadCheckResult(); var acceptRanges = response.Headers["Accept-Ranges"]; result.SupportsResume = !string.IsNullOrEmpty(acceptRanges) && acceptRanges.ToLower().Contains("bytes"); result.Size = (int)response.ContentLength; return result; }
public void OnDownloadStarted(DownloadCheckResult checkResult) { this.OnDownloadStarted(new DownloadStartedEventArgs(this, checkResult)); }