Exemple #1
0
    public ProcessState MoveNext(Command command)
    {
        ProcessState nextState = GetNext(command);

        if (nextState.GetHashCode() == CurrentState.GetHashCode())
        {
            return(CurrentState);
        }

        CurrentState.Exit(this);

        CurrentState = GetNext(command);
        CurrentState.Enter(this);
        return(CurrentState);
    }