Example #1
0
 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;
 }
Example #2
0
 public void OnDownloadStarted(DownloadCheckResult checkResult)
 {
     this.OnDownloadStarted(new DownloadStartedEventArgs(this, checkResult));
 }