public static HttpDownload GetTaskByInfo(DownloadInfo info) { return(new HttpDownload() { Url = info.DownloadUrl, DownloadPath = info.DownloadPath, Info = info, }); }
public void UpdateTask(DownloadInfo info) { if (info == null) { return; } var data = GetDownloadingDataByPath(info.DownloadPath); data.Info = info; data.Save(); }
public DownloadInfo CreateData() { var response = GetResponse(); if (response == null) { throw new NullReferenceException("下载链接已失效"); } var info = new DownloadInfo { ContentLength = response.ContentLength, DownloadUrl = Url, DownloadPath = DownloadPath, }; info.Init(); return(info); }
public NextResult(DownloadInfo info, int errorCode, string errorMessage) { Info = info; ErrorCode = errorCode; ErrorMessage = errorMessage; }
public long GetFileIdByDownloadInfo(DownloadInfo info) { return(GetFileIdByPath(info.DownloadPath)); }