Пример #1
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!");
        }
 public TranslatorAdapter(JapaneseAdaptee japaneseAdaptee)
 {
     this.japaneseAdaptee = japaneseAdaptee;
 }
 public TranslatorAdapter(JapaneseAdaptee adaptee)
 {
     this.adaptee = adaptee;
 }