コード例 #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;
 }