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); }
public decimal Calculate(Consumption c) { return(c.ConsumptionUnits * Price); }
/// <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))); }