Exemple #1
0
 public static Restaurant Map(RestaurantElement restaurant)
 {
     var result = new Restaurant
         {
             Name = restaurant.Name,
             Days = (DayOfWeek)Enum.Parse(typeof(DayOfWeek), GetWeekdayEnum(restaurant.Days))
         };
     return result;
 }
Exemple #2
0
        public void Add(Restaurant restaurant, int points)
        {
            if (_items == null)
                _items = new Dictionary<string, int>();

            if (!_items.ContainsKey(restaurant.Name))
                _items.Add(restaurant.Name, 0);

            _items[restaurant.Name] += points;
        }