コード例 #1
0
 // This constructor will create new state taking values from old state
 public YellowState(TrafficLightState state)
     : this(state.TrafficLightProperty)
 {
 }
コード例 #2
0
ファイル: RedState.cs プロジェクト: ricaramx77/Portafolio
 // This constructor will create new state taking values from old state
 public RedState(TrafficLightState state)
     : this(state.TrafficLightProperty)
 {
 }
コード例 #3
0
 public TrafficLight()
 {
     currentState = new GreenState(this);
 }