Ejemplo n.º 1
0
        public decimal Calculate(Consumption c)
        {
            if (c.ConsumptionUnits > LowerConsumptionBoundary && c.ConsumptionUnits < UpperConsumptionBoundary)
            {
                return(Price * (c.ConsumptionUnits - LowerConsumptionBoundary));
            }

            return(0);
        }
        public decimal Calculate(Consumption c)
        {
            if (Occurence == Occurences.Monthly)
            {
                return(Price * 12);
            }

            return(Price);
        }
Ejemplo n.º 3
0
 public decimal Calculate(Consumption c)
 {
     return(c.ConsumptionUnits * Price);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Calculate the sum of all fees in the Tariff
 /// </summary>
 /// <param name="c">Consumption</param>
 public virtual decimal Calculate(Consumption c)
 {
     return(Fees.Sum(f => f.Calculate(c)));
 }