예제 #1
0
        public static Order CreateRandomOrder()
        {
            var    dishes = DishesPool.GetInstance();
            Random r      = new Random();

            return(new Order(Guid.NewGuid().ToString(), dishes.GetRandomDishes(), r.Next(0, 8)));
        }
예제 #2
0
        public static void Main(string[] args)
        {
            KFCScraper scraper = new KFCScraper();

            scraper.MyScrape("/ScrapersData/KFC/");

            var        scraperDataKFC = Directory.GetFiles(Directory.GetCurrentDirectory() + "/ScrapersData/KFC/");
            DishesPool dishesPool     = DishesPool.GetInstance();

            foreach (var scrapedFile in scraperDataKFC)
            {
                dishesPool.AddDishes(DataWorker.DeserialiseToDishes(scrapedFile));
            }


            CreateHostBuilder(args).Build().Run();
        }