Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Client temp = new Client(new Factory.Factory1());
            temp.Perform();

            temp = new Client(new Factory.Factory2());
            temp.Perform();
        }
Exemplo n.º 2
0
        private static void Main(string[] args)
        {
            var windowsClient = new Client(new WindowsElementFactory());
            windowsClient.CreateButton();
            windowsClient.CreateTextbox();

            var linuxClient = new Client(new LinuxElementFactory());
            linuxClient.CreateButton();
            linuxClient.CreateTextbox();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            Client client = null;
            client = new Client(new CocaColaFactory());
            client.Run();

            client = new Client(new PepsiFactory());
            client.Run();

            Console.ReadLine();
        }
Exemplo n.º 4
0
        /// <summary>
        /// Entry point into console application.
        /// </summary>
        public static void Main()
        {
            // Abstract factory #1
            AbstractFactory factory1 = new ConcreteFactory1();
            Client client1 = new Client(factory1);
            client1.Run();

            // Abstract factory #2
            AbstractFactory factory2 = new ConcreteFactory2();
            Client client2 = new Client(factory2);
            client2.Run();
        }
Exemplo n.º 5
0
        public void Main(string[] args)
        {
            AbstractFactory factory1 = new ConcreteFactory1();
            Client client1 = new Client(factory1);
            client1.Run();

            AbstractFactory factory2 = new ConcreteFactory2();
            Client client2 = new Client(factory2);
            client2.Run();

            Console.Read();
        }
        static void Main(string[] args)
        {
            IAbstractFactory factory1 = new ConcreteFactory1();
            Client client1 = new Client(factory1);
            client1.Launch();

            IAbstractFactory factory2 = new ConcreteFactory2();
            Client client2 = new Client(factory2);
            client2.Launch();

            Console.Read();
        }
Exemplo n.º 7
0
        static void Main(string[] args)
        {
            Factories.AbstractCarFactory fact1 = new SportCarFactory();
            Client c1 = new Client(fact1);
            c1.Run();

            Factories.AbstractCarFactory fact2 = new CityCarFactory();
            Client c2 = new Client(fact2);
            c2.Run();

            Console.ReadKey();
        }
Exemplo n.º 8
0
        public static void Main()
        {
            Client client = null;

            client = new Client(new CocaCollaFactory());
            client.Run();

            client = new Client(new PepsiFactory());
            client.Run();

            client = new Client(new SchweppesFactory());
            client.Run();
        }
Exemplo n.º 9
0
        /// <summary>
        /// Entry point into console application.
        /// </summary>
        public static void Main()
        {
            // Abstract factory #1
            AbstractFactory factory1 = new ConcreteFactory1();
            Client client1 = new Client(factory1);
            client1.Run();

            // Abstract factory #2
            AbstractFactory factory2 = new ConcreteFactory2();
            Client client2 = new Client(factory2);
            client2.Run();

            // Wait for user input
            Console.ReadKey();
        }
Exemplo n.º 10
0
        static void Main()
        {
            AbstractFactory factory1 = new ConcreteFactory1();
            var client1 = new Client(factory1);
            client1.Run();

            AbstractFactory factory2 = new ConcreteFactory2();
            var client2 = new Client(factory2);
            client2.Run();
        }
Exemplo n.º 11
0
        public static void Main()
        {
            Client client = null;

            client = new Client(new CocaColaFactory());
            client.Run();
            client = new Client(new PepsiFactory());
            client.Run();

            client = new Client(new ShwepsFactory());
            client.Run();

            Console.ReadKey();
        }