Пример #1
0
        /// <summary>
        ///     Adds a new restaurant
        /// </summary>
        /// <param name="restaurant"></param>
        public void AddRestaurant(IRestaurant restaurant)
        {
            if (_restaurants.Contains(restaurant))
            {
                throw new Exception("Restaurant is already added");
            }

            _restaurants.Add(restaurant);

            _log.Info("Restaurant added: " + restaurant.GetCommand() + " (" + restaurant.GetName() + ")");
        }
Пример #2
0
 public bool Equals(IRestaurant other)
 {
     return other.GetCommand() == GetCommand();
 }
Пример #3
0
 public bool Equals(IRestaurant other)
 {
     return(other.GetCommand() == GetCommand());
 }