public static Order CreateRandomOrder() { var dishes = DishesPool.GetInstance(); Random r = new Random(); return(new Order(Guid.NewGuid().ToString(), dishes.GetRandomDishes(), r.Next(0, 8))); }
public static DishesPool GetInstance() { if (instance == null) { instance = new DishesPool(); } return(instance); }
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(); }