public InfoProcess() { CurrentState = MyInfoProcessState.Before; transitions = new Dictionary <StateTransition, MyInfoProcessState> { { new StateTransition(MyInfoProcessState.Before, MyInfoProcessCommands.StartAll), MyInfoProcessState.GetCallLog }, }; }
public void MoveNext(MyInfoProcessCommands command) { MyInfoProcessState previewState = CurrentState; CurrentState = GetNext(command); if (this.MyRegistrationListener != null && previewState != CurrentState) { // MyRegistrationListener.onMyRegistrationStateChanged(CurrentState); } }
public StateTransition(MyInfoProcessState currentState, MyInfoProcessCommands command) { CurrentState = currentState; Command = command; }