Beispiel #1
0
 private static void AddMenu(ConcurrentBag <LunchMenu> menus, RestaurantBase restaurant)
 {
     try
     {
         menus.Add(restaurant.Get());
     }
     catch (Exception e)
     {
         menus.Add(new LunchMenu(restaurant.Id, restaurant.Name, restaurant.Url, restaurant.Web, restaurant.Location, restaurant.DistanceFromOffice, restaurant.City));
         Console.WriteLine(e);
     }
 }
Beispiel #2
0
 private static void AddMenu(
     ConcurrentBag <LunchMenu> menus
     , ConcurrentBag <RestaurantBase> todoRestaurants
     , RestaurantBase restaurant)
 {
     try
     {
         menus.Add(restaurant.Get());
     }
     catch (Exception e)
     {
         todoRestaurants.Add(restaurant);
         Console.WriteLine(e);
     }
 }