Beispiel #1
0
        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);
        }
Beispiel #2
0
        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)));
        }