Beispiel #1
0
 public override void Off(Switch sw)
 {
     Debug.WriteLine("Turning light off...");
     sw.State = new OffState();
 }
Beispiel #2
0
 public override void On(Switch sw)
 {
     Debug.WriteLine("Turning light on...");
     sw.State = new OnState();
 }
Beispiel #3
0
 public virtual void Off(Switch sw)
 {
     Debug.WriteLine("Light is already off.");
 }