public abstract void Download( string id, string filePath, Uri url, IEnumerable <KeyValuePair <string, string> > cookies, bool disableTracking, DownloadChangedEventHandler downloadChanged = null, DownloadCompletedEventHandler downloadCompleted = null);
public DownloadItem(string downloaderName, string file, Uri url, IEnumerable <KeyValuePair <string, string> > cookies, DownloadChangedEventHandler downloadChanged = null, DownloadCompletedEventHandler downloadCompleted = null) { DownloaderName = downloaderName; File = file; Url = url; Cookies = cookies; DownloadChanged = downloadChanged; DownloadCompleted = downloadCompleted; DownloadStatus = new DownloadInfo(file, url); }
public CurlDownloadInfo( string id, string outputFile, Uri url, IEnumerable <KeyValuePair <string, string> > cookies = null, bool disableTracking = false, DownloadChangedEventHandler downloadChanged = null, DownloadCompletedEventHandler downloadCompleted = null) { Id = id; OutputFile = outputFile; Url = url; Cookies = cookies; DisableTracking = disableTracking; DownloadChanged = downloadChanged; DownloadCompleted = downloadCompleted; }
public override void Download( string id, string filePath, Uri url, IEnumerable <KeyValuePair <string, string> > cookies, bool disableTracking, DownloadChangedEventHandler downloadChanged = null, DownloadCompletedEventHandler downloadCompleted = null) { var outputFilePath = filePath.ToSafePath(); var downloadInfo = new CurlDownloadInfo(id, outputFilePath, url, cookies, disableTracking, downloadChanged, downloadCompleted); PrepareOutputDirectory(outputFilePath); Sys.RunProcess( _curlBin, downloadInfo.GetCommadArguments(), true, (data) => HandleDownloadFeedback(data, downloadInfo), HandleDownloadError, (exitCode) => HandleDownloadCompleted(exitCode, downloadInfo)); }