コード例 #1
0
 public ShippingDecorator(IDokanProduct product) : base(product)
 {
     this.decoratorName = "Shipping Decorator";
     this.AddOnPrice    = _dokanProduct.AddOnPrice + GetShippingCost();
 }
コード例 #2
0
 protected Decorator(IDokanProduct value)
 {
     _dokanProduct         = value;
     this.BaseProductPrice = _dokanProduct.BaseProductPrice;
 }
コード例 #3
0
 public VatDecorator(IDokanProduct product) : base(product)
 {
     this.decoratorName = "Vat Decorator";
     this.AddOnPrice    = _dokanProduct.AddOnPrice + GetVat();
 }
コード例 #4
0
 public TaxDecorator(IDokanProduct product, double taxPercentage) : base(product)
 {
     this.decoratorName = "Tax Decorator";
     this.AddOnPrice    = _dokanProduct.AddOnPrice + GetTax(_dokanProduct.BaseProductPrice, taxPercentage);
 }
コード例 #5
0
 public DiscountDecorator(IDokanProduct product) : base(product)
 {
     this.decoratorName = "Free Decorator";
     AddOnPrice         = _dokanProduct.AddOnPrice;
     BaseProductPrice   = 0;
 }