private static decimal GetDiscountedPrice(IDiscount discount, IGrouping <string, Item> skuBatch) { return(discount.IsMatch(skuBatch) ? discount.DiscountedPrice(skuBatch) : skuBatch.Sum(b => b.UnitPrice)); }