static void Main(string[] args)
 {
     IAbstractFactory factoryA = new ConcreteFactoryA();
     IAbstractFactory factoryB = new ConcreteFactoryB();
     Client           client1  = new Client(factoryA);
     Client           client2  = new Client(factoryB);
 }
Ejemplo n.º 2
0
        private static void Main()
        {
            var concreteFactoryA = new ConcreteFactoryA();
            var clientA          = new Client(concreteFactoryA);

            clientA.Run();

            var concreteFactoryB = new ConcreteFactoryB();
            var clientB          = new Client(concreteFactoryB);

            clientB.Run();

            Console.ReadKey();
        }