public string GetItemDisplay(Item item, IPricer pricer = null) { var display = $"{item.Type} - {item.Name} - {item.Superficy} cm²"; if (pricer != null) { display += $" - Estimation cout : { pricer.Price(item.Superficy)}" + Euro; } return(display); }
private string GetShapeEstimation(AbstractShape shape, IPricer pricer) { string baseStr = GetShapeDescription(shape); return(string.Format("{0} - Estimation cout : {1}", baseStr, pricer.Price(shape.Surface).ToString("C", CultureInfo.CurrentCulture))); }