コード例 #1
0
 /// <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;
 }
コード例 #2
0
 /// <summary>
 ///     Set the sauce to use
 /// </summary>
 /// <param name="item"></param>
 public void SetSauce(PriceList.PricedItem item)
 {
     Sauce = item;
 }
コード例 #3
0
 /// <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
     };
 }