Example #1
0
        public bool RemoveFavoriteProduct(ProductBase product)
        {
            if (FieldValidationService.ValidateNotNull(product) == false)
            {
                throw new ArgumentException();
            }

            return(_favoriteProducts.Remove(product));
        }
Example #2
0
        public void Add(ProductBase product)
        {
            if (FieldValidationService.ValidateNotNull(product) == false || _cartItems.Contains(product))
            {
                throw new ArgumentException();
            }

            _cartItems.Add(product);
        }
Example #3
0
 public ConcreteProduct(ProductBase product)
 {
     ProductId = LongIdGenerator.Increment();
     Product   = product;
 }