Esempio n. 1
0
        private void CalculateValue()
        {
            var result = _voucherValidator.Validate(Products, Vouchers);

            ErrorMessages = result.invalidVouchers?.OfType <InvalidVoucherDecorator>()?.Select(invalid => invalid.Message).ToList(); // show messages

            TotalValue = _valueCalculator.CalculateValue(Products, result.validVouchers);
        }
Esempio n. 2
0
 public void CalculateValue(IValueCalculator calculator, int basisPoints)
 {
     ValueDelta = calculator.CalculateValue(this, basisPoints);
 }