示例#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());
 }