public override string ToString() { StringBuilder result = new StringBuilder(); result.AppendLine($"---- {Name} ----"); if (Dough != null) { result.AppendLine(Dough.Description()); } if (Sauce != null) { result.AppendLine(Sauce.Description()); } if (Cheese != null) { result.AppendLine(Cheese.Description()); } if (Veggies != null) { result.AppendLine("Veggies : "); foreach (var veggie in Veggies) { result.AppendLine(veggie.Description().PadLeft(40)); } } if (Clam != null) { result.AppendLine(Clam.Description()); } if (Pepperoni != null) { result.AppendLine(Pepperoni.Description()); } return(result.ToString()); }
public override void Prepare() { Console.WriteLine($"Preparing { Name}"); Dough = _pizzaIngredientFactory.CreateDough(); Dough.Dough(); Sauce = _pizzaIngredientFactory.CreateSauce(); Sauce.Sauce(); }