Ejemplo n.º 1
0
        public Insurance(IInsuranceTaxComponent component, Vehicle vehicle, Insured insured)
        {
            Value = component.Calculate();

            VehicleId = vehicle.Id;
            Vehicle   = vehicle;

            InsuredId = insured.Id;
            Insured   = insured;
        }
Ejemplo n.º 2
0
 public RiskRateTaxAndPremiumDecorator(IInsuranceTaxComponent component) : base(component)
 {
     _riskRate    = base.Calculate() * 5 / (2 * base.Calculate());
     _premiumRate = (_riskRate / 100) * base.Calculate();
 }
Ejemplo n.º 3
0
 public IInsuranceTaxComponent Decorate(IInsuranceTaxComponent component) => new PureAwardDecorator(component);
Ejemplo n.º 4
0
 public InsuranceTaxDecorator(IInsuranceTaxComponent component)
 {
     _innerTax = component;
 }
Ejemplo n.º 5
0
 public PureAwardDecorator(IInsuranceTaxComponent component) : base(component)
 {
     _value = base.Calculate() * (1 + SystemConst.MARGEM_SEGURANCA);
 }
Ejemplo n.º 6
0
 public IInsuranceTaxComponent Decorate(IInsuranceTaxComponent component) => new RiskRateTaxAndPremiumDecorator(component);
Ejemplo n.º 7
0
 public IInsuranceTaxComponent Decorate(IInsuranceTaxComponent component) => new CommercialAwardDecorator(component);
Ejemplo n.º 8
0
 public CommercialAwardDecorator(IInsuranceTaxComponent component) : base(component)
 {
     _value = SystemConst.LUCRO * base.Calculate();
 }