Пример #1
0
        public static void Main()
        {
            // We can choose concrete constructor (director)
            var constructor = new DishConstructor();

            // And we can choose concrete builder
            var potatoCooker = new FriedPotatoesCooker();
            constructor.Construct(potatoCooker);

            var meatCooker = new MeatballsCooker();
            constructor.Construct(meatCooker);
        }
Пример #2
0
        public static void Main()
        {
            // We can choose concrete constructor (director)
            var constructor = new DishConstructor();

            // And we can choose concrete builder
            var potatoCooker = new FriedPotatoesCooker();

            constructor.Construct(potatoCooker);

            var meatCooker = new MeatballsCooker();

            constructor.Construct(meatCooker);
        }