Beispiel #1
0
 /// <summary>
 /// Correct the values in a list for a deviation from a total
 /// </summary>
 /// <param name="aDevianceCorrection">A deviance correction.</param>
 public void Apply(DevianceCorrection aDevianceCorrection)
 {
     switch (aDevianceCorrection)
     {
         case DevianceCorrection.None:
             break;
         case DevianceCorrection.CorrectAmount:
             _amount = _amountParts.Sum(c => c.Value);
             break;
         case DevianceCorrection.CorrectList:
             CorrectList();
             break;
         default:
             break;
     }
 }
Beispiel #2
0
        /// <summary>
        /// Correct the values in a list for a deviation from a total
        /// </summary>
        /// <param name="aDevianceCorrection">A deviance correction.</param>
        public void Apply(DevianceCorrection aDevianceCorrection)
        {
            switch (aDevianceCorrection)
            {
            case DevianceCorrection.None:
                break;

            case DevianceCorrection.CorrectAmount:
                _amount = _amountParts.Sum(c => c.Value);
                break;

            case DevianceCorrection.CorrectList:
                CorrectList();
                break;

            default:
                break;
            }
        }