示例#1
0
 public Product(Decimal basePrice, List <ProductAttribute> attributes, IList <ProductSell> productSells)
 {
     AssertionConcerns.AssertArgumentRange(basePrice, 0, Decimal.MaxValue, "Product Base Price Cannot be Negative");
     BasePrice    = basePrice;
     Attributes   = attributes ?? new List <ProductAttribute>();
     ProductSells = productSells ?? new List <ProductSell>();
 }
示例#2
0
 public ProductPrice(decimal discount, decimal price, decimal lowestPrice)
 {
     AssertionConcerns.AssertArgumentRange(discount, 0, Decimal.MaxValue, "Discount cannot be negative");
     AssertionConcerns.AssertArgumentRange(price, 0, Decimal.MaxValue, "Price cannot be negative");
     AssertionConcerns.AssertArgumentRange(lowestPrice, 0, Decimal.MaxValue, "LowestPrice cannot be negative");
     Discount    = discount;
     Price       = price;
     LowestPrice = lowestPrice;
 }