/// <summary> /// Removes a menu item from the appropriate lists /// </summary> /// <param name="item">The item to remove</param> public void RemoveItem(IMenuItem item) { AvalibleMenuItems.Remove(item); if (item is Entree e) { AvalibleEntrees.Remove(e); } else if (item is Side s) { AvailableSides.Remove(s); } else if (item is Drink d) { AvailableDrinks.Remove(d); } else if (item is CretaceousCombo c) { AvailableCombos.Remove(c); } }
/// <summary> /// Removes item from menu lists /// </summary> /// <param name="item">Menu item</param> public void Remove(IMenuItem item) { AvailableMenuItems.Remove(item); if (item is Entree) { AvailableEntrees.Remove(item as Entree); } if (item is Side) { AvailableSides.Remove(item as Side); } if (item is Drink) { AvailableDrinks.Remove(item as Drink); } if (item is CretaceousCombo) { AvailableCombos.Remove(item as CretaceousCombo); } }