/// <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() + ")"); }
public bool Equals(IRestaurant other) { return other.GetCommand() == GetCommand(); }
public bool Equals(IRestaurant other) { return(other.GetCommand() == GetCommand()); }