Пример #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Design Patterns - Adapter!");

            Driver driver = new Driver();

            Car car = new Car();

            driver.Travel(car);

            Camel      camel          = new Camel();
            ITransport camelTransport = new CamelToTransportAdapter(camel);

            driver.Travel(camelTransport);
        }
Пример #2
0
 public CamelToTransportAdapter(Camel camel)
 {
     _camel = camel;
 }