Beispiel #1
0
        public void Using()
        {
            var bulb    = new Bulb();
            var turnOn  = new TurnOn(bulb);
            var turnOff = new TurnOff(bulb);

            var remote = new RemoteControl();

            remote.Submit(turnOn);
            remote.Submit(turnOff);
        }
Beispiel #2
0
 public TurnOff(Bulb bulb)
 {
     this.bulb = bulb;
 }