Пример #1
0
        static void Main(string[] args)
        {
            Target t1 = new Target();

            t1.ExpectedMethod();

            Adaptee adaptee = new Adaptee();
            Target  t2      = new Adapter(adaptee);

            t2.ExpectedMethod();

            // Output:
            // Calls the ExpectedMethod
            // Calls the DifferentMethod
        }