Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Director         d   = new Director();
            ConcreteBuilder1 cb1 = new ConcreteBuilder1();
            ConcreteBuilder2 cb2 = new ConcreteBuilder2();

            d.Construct(cb1);
            Product p1 = cb1.getResult();

            p1.show();

            d.Construct(cb2);
            Product p2 = cb2.getResult();

            p1.show();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Builder  createrA = new ConcreteBuilderA();
            Director director = new Director(createrA);
            Product  proA     = director.createProduct();

            proA.show();
            Console.Read();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            Director director = new Director();
            Builder  b1       = new ConcreteBuilder1();

            director.Construct(b1);
            Product pr = b1.GetResult();

            pr.show();
            Console.ReadKey();
        }
Exemplo n.º 4
0
        public static void Main()
        {
            Director director = new Director();

            Builder b1 = new ConcreteBuilder1();
            Builder b2 = new ConcreteBuilder2();

            director.Construct(b1);
            Product p1 = b1.GetResult();

            p1.show();

            directorr.Construct(b2);
            Product p2 = b2.GetResult();

            p2.show();

            Console.ReadKey();
        }