Esempio n. 1
0
        static void Main(string[] args)
        {
            var newElectricitySystem = new NewElectricitySystem();
            var oldElectricitySystem = new OldElecticitySystem();

            ElectricityConsumer.ChargePhone(newElectricitySystem);

            var adapter = new Adaprer(oldElectricitySystem);

            ElectricityConsumer.ChargePhone(adapter);
            Console.ReadKey();
        }
Esempio n. 2
0
 public Adaprer(OldElecticitySystem _OldElecticitySystem)
 {
     OldElecticitySystem = _OldElecticitySystem;
 }