예제 #1
0
        static void Main(string[] args)
        {
            var twoPinPlug     = new TwoPinPlug();
            var threePinSocket = new ThreePinSocket();
            var adapter        = new Adapter(threePinSocket);

            adapter.PlugIntoTwoPinSocket();
        }
예제 #2
0
파일: Program.cs 프로젝트: quangnle/GOF
        static void Main(string[] args)
        {
            TwoPinPlug   plug    = new TwoPinPlug();
            ThreePinPlug adapter = new Adapter(plug);

            adapter.Plug();

            Console.ReadLine();
        }
예제 #3
0
파일: Program.cs 프로젝트: quangnle/GOF
 public Adapter(TwoPinPlug plug)
 {
     _plug = plug;
 }