Ejemplo n.º 1
0
        private static List <PriceScraper> CreatePriceScrapers(List <string> auctionIds)
        {
            // Create all the auction price scapers
            List <PriceScraper> auctions = new List <PriceScraper>();

            auctionIds.ForEach(a => {
                PriceScraper auction = new PriceScraper(a);
                auctions.Add(auction);
            });

            return(auctions);
        }
Ejemplo n.º 2
0
 private static Task StartPriceGrabber(Auction auction)
 {
     // Going to have several auctions starting at the top of the hour.
     // Lock down the startup process to avoid conflicts
     lock (scrapers)
     {
         PriceScraper s = new PriceScraper($"{auction.YardNum}-{auction.Lane}");
         scrapers.Add(s);
         Console.WriteLine($"New auction started. {auction.YardNum} {auction.Lane} {auction.StartTime}");
         return(s.Start());
     }
 }