Esempio n. 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)));
        }
Esempio n. 2
0
 public static DishesPool GetInstance()
 {
     if (instance == null)
     {
         instance = new DishesPool();
     }
     return(instance);
 }
Esempio n. 3
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();
        }