Пример #1
0
        static void Main(string[] args)
        {
            //consummer code
            Driver driver = new Driver();

            Auto auto = new Auto();

            driver.Travel(auto);


            Camel camel = new Camel();

            // use adapter
            ITransport camelTransport = new CamelToTransportAdapter(camel);

            driver.Travel(camelTransport);

            Console.Read();
        }
Пример #2
0
 public CamelToTransportAdapter(Camel c)
 {
     camel = c;
 }