Пример #1
0
        public ProductBase(int id, string title, decimal price, CategoryBase category)
        {
            if (id <= 0 || price < 0)
            {
                throw new ArgumentException();
            }

            Id       = id;
            Price    = price;
            Title    = title.ThrowIfNull(nameof(title));
            Category = category.ThrowIfNull(nameof(category));
        }
Пример #2
0
        public CampaignBase(int id, string title, decimal discount, CategoryBase category)
        {
            if (id <= 0 || discount < 0)
            {
                throw new ArgumentException();
            }

            Id       = id;
            Discount = discount;
            Title    = title.ThrowIfNull(nameof(title));
            Category = category.ThrowIfNull(nameof(category));
        }
Пример #3
0
 public CampaignDiscountByAmount(int id, string title, decimal discount, CategoryBase category, decimal trasholdCount) : base(id, title, discount, category)
 {
     TrasholdCount = trasholdCount;
 }
Пример #4
0
 public FirstProduct(int id, string title, decimal price, CategoryBase category) : base(id, title, price, category)
 {
 }