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

            adapter.PlugIntoTwoPinSocket();
        }
Example #2
0
        static void Main(string[] args)
        {
            TwoPinPlug   plug    = new TwoPinPlug();
            ThreePinPlug adapter = new Adapter(plug);

            adapter.Plug();

            Console.ReadLine();
        }
Example #3
0
 public Adapter(TwoPinPlug plug)
 {
     _plug = plug;
 }