Beispiel #1
0
        /// <summary>
        /// The main.
        /// </summary>
        private static void Main()
        {
            var commandSender = new CommandSender();

            var deviceA = new DeviceA();

            commandSender.Push(new DeviceAdapterA(deviceA));
            commandSender.Push(new DeviceAdapterInterfaceA(deviceA));

            var deviceB = new DeviceB();

            commandSender.Push(new DeviceAdapterB(deviceB));
            commandSender.Push(new DeviceAdapterInterfaceB(deviceB));

            var deviceC = new DeviceC();

            commandSender.Push(new DeviceAdapterC(deviceC));
            commandSender.Push(new DeviceAdapterInterfaceC(deviceC));

            Console.ReadLine();
        }
Beispiel #2
0
 public DeviceAdapterC(DeviceC device)
 {
     this.device = device;
 }
Beispiel #3
0
 public DeviceAdapterInterfaceC(DeviceC device)
 {
     this.device = device;
 }