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

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

            adapter.Plug();

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