Esempio n. 1
0
            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);
            }
Esempio n. 2
0
 public DownloadFileStatus(DownloadFileInformation information, bool result)
     : this(information.id, information.url, result)
 {
 }
Esempio n. 3
0
 private Downloader(WebClient client, DownloadFileInformation information)
 {
     this.information = information;
     this.client      = client;
     this.client.DownloadFileCompleted += client_DownloadFileCompleted;
 }