internal static iCoffee Create(BrewStyle coffeeType) { if (!coffees.Exists(coffee => coffee.Style == coffeeType)) coffees.Add(CoffeeSwitch(coffeeType)); return coffees.First(coffee => coffee.Style == coffeeType); }
public void BrewCoffee(BrewStyle coffeeType) { var coffee = CoffeeFactory.Create(coffeeType); coffee.Brew(); coffee.Pour(); }
internal static iCoffee CoffeeSwitch(BrewStyle coffeeType) => coffeeType switch {