/// <summary> /// Deep copies an order /// </summary> /// <param name="copy"></param> public Order(Order copy) { _bread = copy._bread; _spread = new List <PriceList.PricedItem>(); foreach (var spread in copy._spread) { _spread.Add(spread); } _sauce = copy._sauce; _vegetables = copy._vegetables; }
/// <summary> /// Set the sauce to use /// </summary> /// <param name="item"></param> public void SetSauce(PriceList.PricedItem item) { Sauce = item; }
/// <summary> /// Set the spread used. Overwrites all existing ones /// </summary> /// <param name="item"></param> public void SetSpread(PriceList.PricedItem item) { Spread = new List <PriceList.PricedItem> { item }; }