public static Downloader Run(DownloadFileInformation information) { var client = new WebClient(); var downloader = new Downloader(client, information); downloader = Downloader.CurrentlyDownloading.GetOrAdd(information.FilePath, downloader); if (!downloader.downloadStarted) { downloader.downloadStarted = true; downloader.Download(); } return(downloader); }
public DownloadFileStatus(DownloadFileInformation information, bool result) : this(information.id, information.url, result) { }
private Downloader(WebClient client, DownloadFileInformation information) { this.information = information; this.client = client; this.client.DownloadFileCompleted += client_DownloadFileCompleted; }