static private Decimal MenuFlow(int Id) { if (Id == 0) { return(0); } return(collection.ItemById(Id).Product.Price); }
private Product Dispense(int Id) { if (collection.Count > 0) { ContainableItem itemToDispense = collection.ItemById(Id); collection.RemoveById(Id); return(itemToDispense.Product); } else { return(null); } }