Пример #1
0
        static void Main(string[] args)
        {
            Console.OutputEncoding = System.Text.Encoding.Unicode;
            var client = new TranslatorAdapter(new JapaneseAdaptee());

            client.Send("Xin Chào");
            Console.ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to Adapter Pattern.");
            //--------------------------------------------//
            JapaneseAdaptee   adaptee          = new JapaneseAdaptee();
            IVietnameseTarget vietnameseTarget = new TranslatorAdapter(adaptee);

            vietnameseTarget.Send("Xin Chào!");
        }