Пример #1
0
        static void RunAbstractFactory()
        {
            HotDrinkMachine machine = new HotDrinkMachine();
            IHotDrink       drink   = machine.MakeDrink(HotDrinkMachine.AvailableDrink.Tea, 100);

            drink.Consume();
        }
Пример #2
0
        static void Main(string[] args)
        {
            var machine = new HotDrinkMachine();

            var drink = machine.MakeDrink(HotDrinkMachine.AvailableDrink.Tea, 200);

            var drink2 = machine.MakeDrink(HotDrinkMachine.AvailableDrink.Coffee, 200);
        }