private ICalcRule CreateCalcRule(CalcRuleType _ruleType, CalcAmountType _amountType, decimal _amount, int _priority) { ICalcRule ruleToCreate; switch (_ruleType) { case CalcRuleType.Discount: ruleToCreate = new Discount(_amountType, _amount); break; case CalcRuleType.Fee: default: ruleToCreate = new Fee(_amountType, _amount); break; } ruleToCreate.Priority = _priority; return(ruleToCreate); }
public Fee(CalcAmountType _amountType, decimal _amount) : base(_amountType, _amount) { }
public RuleBase(CalcAmountType _amountType, decimal _amount) { AmountType = _amountType; Amount = _amount; }
public Discount(CalcAmountType _amountType, decimal _amount) : base(_amountType, _amount) { }