public static double GetSauceCost(Sauces sauce) { var standardSauceCost = 0.25; var specialSauceCost = 0.5; return(sauce == Sauces.Barbecue ? specialSauceCost : standardSauceCost); }
public SauceDecorator(Pizza pizza, Sauces sauce) : base(pizza) { Sauce = sauce; cost = PricingClient.GetSauceCost(Sauce); description = $"{Sauce} sauce"; }
public IPizzaBuilderCrust WithSauce(Sauces sauce) { pizza = new SauceDecorator(pizza, sauce); return(this); }
public IPizzaBuilderToppings WithSauce(Sauces selectedSauce) { pizza.Sauce = selectedSauce; return(this); }