public PurchaseItem(ISellableProduct product, int quantity) { Guard.Against.Null(product, nameof(product)); Guard.Against.NegativeOrZero(quantity, nameof(quantity)); Product = product; Quantity = quantity; }
/// <summary> /// Adds a product. /// </summary> /// <param name="product"></param> public void AddProduct(ISellableProduct product) { Products.Add(product); }