public static List <OrderItem> GetLunchSpecialOrderItems(GuestComboItem guestComboItem) { //TODO: What if Lunch Special with deep topping??? bool foundSalad = false; bool foundSlice = false; var orderItems = new List <OrderItem>(); OrderItem lunchSpecialPizza = new Pizza(); OrderItem lunchSpecialSalad = new Salad(SaladSize.LunchSpecial); OrderItem slice = new Pizza() { PizzaType = PizzaType.LunchSpecialSlice }; foreach (var item in guestComboItem.ComboGuestItems) { Guid id = Guid.NewGuid(); if (item.ID == 57M) { foundSlice = true; lunchSpecialPizza = GetPizza(item); lunchSpecialPizza.PartOfCombo = true; lunchSpecialPizza.ComboId = id; } else if (item.ID == 50M) { foundSalad = true; lunchSpecialSalad = GetSalad(item); lunchSpecialSalad.PartOfCombo = true; lunchSpecialSalad.ComboId = id; } } if (foundSlice && foundSalad) { orderItems.Add(lunchSpecialSalad); orderItems.Add(lunchSpecialPizza); return(orderItems); } return(null); }
internal static List <OrderItem> GetLunchSpecial(GuestComboItem guestComboItem) { throw new NotImplementedException(); }