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();
        }
Example #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();
        }
        static void Main(string[] args)
        {
            ITarget adapter = new VendorAdapter();

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

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