Example #1
0
        public PurchaseItem(ISellableProduct product, int quantity)
        {
            Guard.Against.Null(product, nameof(product));
            Guard.Against.NegativeOrZero(quantity, nameof(quantity));

            Product  = product;
            Quantity = quantity;
        }
Example #2
0
 /// <summary>
 /// Adds a product.
 /// </summary>
 /// <param name="product"></param>
 public void AddProduct(ISellableProduct product)
 {
     Products.Add(product);
 }