Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public Fee(CalcAmountType _amountType, decimal _amount) : base(_amountType, _amount)
 {
 }
Exemplo n.º 3
0
 public RuleBase(CalcAmountType _amountType, decimal _amount)
 {
     AmountType = _amountType;
     Amount     = _amount;
 }
Exemplo n.º 4
0
 public Discount(CalcAmountType _amountType, decimal _amount) : base(_amountType, _amount)
 {
 }