static void Main(string[] args)
        {
            Console.Title = "Demo of the Adapter Pattern";
            ITarget adapter = new VendorAdapter();

            foreach (string brand in adapter.GetCars())
            {
                Console.WriteLine("Brand: " + brand);
            }
            Console.ReadLine();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            ITarget adapter = new VendorAdapter();

            foreach (string product in adapter.GetProducts())
            {
                Console.WriteLine(product);
            }

            // Wait for user
            Console.ReadKey();
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            ITarget adapter = new VendorAdapter();

            foreach (string product in adapter.GetProducts())
            {
                Console.WriteLine(product);
            }

            // Wait for user
            Console.ReadKey();
        }