Exemple #1
0
 protected override void Initialize()
 {
     // Instantiate constituents
     _amazon    = new Amazon(this);
     _customer  = new Customer(this);
     _dell      = new BarnesAndNoble(this);
     _ups       = new UPS(this);
     _upsDriver = new UPSDriver(this);
     _visa      = new Visa(this);
 }
Exemple #2
0
        static void Main(string[] args)
        {
            Console.Write("What is the Manga/Light Novel Title: ");
            bookTitle = Console.ReadLine();
            Console.Write("Are u searching for a Manga (M) or Light Novel (N): ");
            bookType = char.Parse(Console.ReadLine());

            Stopwatch watch = new Stopwatch();

            watch.Start();

            var RightStufAnimeTask = Task.Factory.StartNew(() => RightStufAnime.GetRightStufAnimeData(bookTitle, bookType, true, 1));

            var RobertsAnimeCornerStoreTask = Task.Factory.StartNew(() => RobertsAnimeCornerStore.GetRobertsAnimeCornerStoreData(bookTitle, bookType));

            var BarnesAndNobleTask = Task.Factory.StartNew(() => BarnesAndNoble.GetBarnesAndNobleData(bookTitle, bookType, 1));

            Task.WhenAll(RightStufAnimeTask, RobertsAnimeCornerStoreTask, BarnesAndNobleTask);

            RightStufAnimeData          = RightStufAnimeTask.Result;
            RobertsAnimeCornerStoreData = RobertsAnimeCornerStoreTask.Result;
            BarnesAndNobleData          = BarnesAndNobleTask.Result;

            List <string[]> FinalData = PriceComparison(PriceComparison(RightStufAnimeData, BarnesAndNobleData), RobertsAnimeCornerStoreData);

            using (StreamWriter outputFile = new StreamWriter(@"C:\MangaWebScrape\MangaWebScrape\Data.txt"))
            {
                foreach (string[] data in FinalData)
                {
                    outputFile.WriteLine(data[0] + " " + data[1] + " " + data[2] + " " + data[3]);
                }
            }

            watch.Stop();
            Console.WriteLine($"Time in Miliseconds: {watch.ElapsedMilliseconds}");
        }