static void Main(string[] args) { IBeverage espresso = new FluentEspresso() .AddWater(20) .AddBeans() .ToBeverage(); Console.WriteLine(); IBeverage americano = new FluentEspresso() .AddWater(20) .AddWater(2) .AddBeans() .AddWater(2) .ToBeverage(); Console.WriteLine(); IBeverage latte = new FluentEspresso() .AddWater(20) .AddBeans() .AddMilk() .ToBeverage(); Console.ReadKey(); }
static void Main(string[] args) { try { FluentEspresso beverage = new FluentEspresso().AddWater(25, 85).AddBeans(new Bean(4, Bean.BeanTypes.Arabica)).GrindBeans().AddWater(15, true); Console.WriteLine(beverage.ToBeverage()); } catch (Exception e) { Console.WriteLine(e.Message); } }
static void Main(string[] args) { IBeverage espresso = new FluentEspresso() .FillWater() .AddBeans(new Bean() { AmountInG = 5, Sort = CoffeSort.Robusta }) .PourEspresso() //.AddWater(5) .AddMilk() .AddChocolate() .MyIngredients() .ToBeverage(); Console.WriteLine(espresso.GetType()); Console.ReadKey(); }