Пример #1
0
        static void Main(string[] args)
        {
            // change wind speed over 35 km/h
            // and you will not be able to up/down the rolling shutters
            const int WindSpeed  = 30;
            var       anemometer = new Anemometer(WindSpeed);

            var proxy = new ProxyCommand(anemometer);

            // try to up/down the rolling shutters
            proxy.Up();

            Console.WriteLine();

            proxy.Down();

            Console.Read();
        }
Пример #2
0
 public ProxyCommand(Anemometer anemometer)
 {
     _anemometer = anemometer;
     _command    = new Command();
 }