Exemple #1
0
 public bool AddNewIceCream(IceCream item)
 {
     var startingCount = _iceCreamInventory.Count();
     _iceCreamInventory.Add(item);
     if (startingCount < _iceCreamInventory.Count)
     {
         return true;
     }
     else { return false; }
 }
Exemple #2
0
 public void UpdateFullIceCreamObject(IceCream newIceCreamInfo)
 {
     foreach (var iceCream in _iceCreamInventory)
     {
         if (newIceCreamInfo.Flavor == iceCream.Flavor)
         {
             iceCream.ContainsDairy = newIceCreamInfo.ContainsDairy;
             iceCream.ContainsNuts = newIceCreamInfo.ContainsNuts;
             iceCream.Texture = newIceCreamInfo.Texture;
             iceCream.Quantity = newIceCreamInfo.Quantity;
         }
     }
 }