Example #1
0
        static void Main(string[] args)
        {
            Console.OutputEncoding = Encoding.UTF8;
            ConcreteBuild1 c1 = new ConcreteBuild1();
            ConcreteBuild2 c2 = new ConcreteBuild2();

            Director d = new Director();

            d.Contruct(c1);
            c1.GetResult().Show();

            d.Contruct(c2);
            c2.GetResult().Show();

            Console.ReadKey();
        }
Example #2
0
        static void Main(string[] args)
        {
            Director d  = new Director();
            Builder  b1 = new ConcreteBuild1();
            Builder  b2 = new ConcreteBuild2();

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

            p1.Show();

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

            p2.Show();

            Console.ReadKey();
        }