Last active
December 17, 2017 16:36
-
-
Save litichevskiydv/fb9f88a46b6eb1141d78a0d260920b9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PrintOrderCostCalculationService : IPrintOrderCostCalculationService | |
{ | |
private readonly IEnumerable<IExpensesCalculator> _expensesCalculators; | |
public PrintOrderCostCalculationService(IEnumerable<IExpensesCalculator> expensesCalculators) | |
{ | |
_expensesCalculators = expensesCalculators; | |
} | |
public double Calculate(PrintOrder order) | |
{ | |
return _expensesCalculators.Sum(x => x.Calculate(order)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment