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

            temp = new Client(new Factory.Factory2());
            temp.Perform();
        }
Example #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();
        }
Example #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();
        }
Example #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();
        }
Example #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();
        }
        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();
        }
Example #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();
        }
Example #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();
        }
Example #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();
        }
Example #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();
        }