示例#1
0
        public void Run()
        {
            Driver driver = new Driver();
            Auto   auto   = new Auto();

            driver.Travel(auto);

            Camel camel = new Camel();

            ITransport camelTransport = new CamelToTransportAdapter(camel);

            driver.Travel(camelTransport);

            Console.Read();
        }
示例#2
0
 public CamelToTransportAdapter(Camel c)
 {
     _camel = c;
 }