Exemple #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();
        }
Exemple #2
0
 public DeviceAdapterC(DeviceC device)
 {
     this.device = device;
 }
Exemple #3
0
 public DeviceAdapterInterfaceC(DeviceC device)
 {
     this.device = device;
 }