refactoring

This commit is contained in:
2017-06-02 10:13:55 +02:00
parent 95a417fa6e
commit aa31861e51
3 changed files with 5 additions and 18 deletions

View File

@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using Yavsc.Billing;
using Yavsc.Models.Billing;
namespace Yavsc.Helpers
{
@ -8,5 +9,7 @@ namespace Yavsc.Helpers
{
public static decimal Addition(this List<IBillItem> items) => items.Aggregate<IBillItem, decimal>(0m, (t, l) => t + l.Count * l.UnitaryCost);
public static decimal Addition(this List<CommandLine> items) => items.Select(i=>((IBillItem)i)).ToList().Addition();
}
}