コード例 #1
0
 public void TransistionTo(State2 state)
 {
     Console.WriteLine($"Context: Transition to {state.GetType().Name}");
     this._state = state;
     this._state.SetContext(this);
 }
コード例 #2
0
 public Context2(State2 state)
 {
     this.TransistionTo(state);
 }