Ejemplo n.º 1
0
        public void RunDownloadSync()
        {
            List <string> websites = Ultility.PrepData();

            foreach (var site in websites)
            {
                WebsiteDataModel result = Ultility.DownloadWebsite(site);
                result.Report();
            }
        }
Ejemplo n.º 2
0
        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}");
        }
Ejemplo n.º 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}");
        }