예제 #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);
        }
예제 #2
0
파일: Fee.cs 프로젝트: HarkNeal/PL.CC
 public Fee(CalcAmountType _amountType, decimal _amount) : base(_amountType, _amount)
 {
 }
예제 #3
0
파일: RuleBase.cs 프로젝트: HarkNeal/PL.CC
 public RuleBase(CalcAmountType _amountType, decimal _amount)
 {
     AmountType = _amountType;
     Amount     = _amount;
 }
예제 #4
0
 public Discount(CalcAmountType _amountType, decimal _amount) : base(_amountType, _amount)
 {
 }