public FlashSale(DiscountApplier discountApplier, int expirationInMilliseconds) : base(discountApplier) { _rate = 0.05m; _timer = new Timer(expirationInMilliseconds); _timer.Elapsed += OnDiscountExpiration; _timer.Start(); }
public DailySale(DiscountApplier discountApplier) : base(discountApplier) { _rate = 0.50m; _timer = new Timer(15000); // Ten seconds just to visualize the funcionallity. _timer.Elapsed += OnDiscountExpiration; _timer.Start(); }
public FirstPurchaseDiscount(DiscountApplier discountApplier) : base(discountApplier) { _rate = 0.20m; }
public Discount(DiscountApplier discountApplier) { _discountApplier = discountApplier; }