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