Exemple #1
0
        public void RunDownloadSync()
        {
            List <string> websites = Ultility.PrepData();

            foreach (var site in websites)
            {
                WebsiteDataModel result = Ultility.DownloadWebsite(site);
                result.Report();
            }
        }
        public string RunDownloadSync()
        {
            List <string> websites = Ultility.PrepData();

            foreach (var site in websites)
            {
                WebsiteDataModel result = Ultility.DownloadWebsite(site);
                result.Report();
            }
            return($"RunDownloadSync - Done - Thread {Thread.CurrentThread.ManagedThreadId}");
        }
Exemple #3
0
        public string RunDownload()
        {
            List <string> websites = Ultility.PrepData();

            foreach (var site in websites)
            {
                WebsiteDataModel result = new WebsiteDataModel();
                Thread           thread = new Thread(() => { result = Ultility.DownloadWebsite(site); });
                thread.Start();
                //thread.Join();
                result.Report();
            }
            return($"RunDownloadSync - Done - Thread {Thread.CurrentThread.ManagedThreadId}");
        }