Exemplo n.º 1
0
        private void TriggerQueued()
        {
            while (_transitionCommandQueue.Count > 0)
            {
                SetInternalState(PlainStateMachineInternalState.EvaluatingTransitions);

                TransitionCommand transition = _transitionCommandQueue.Dequeue();

                TState stateTo = default;

                try
                {
                    if (TryGetStateTo(transition.trigger, out stateTo))
                    {
                        Transition(transition.trigger, stateTo);
                    }
                }
                catch (MultipleValidTransitionsFromSameStateException)
                {
                    _transitionCommandQueue.Clear();
                    SetInternalState(PlainStateMachineInternalState.Idle);
                    throw;
                }
                catch
                {
                    throw;
                }
            }
        }
Exemplo n.º 2
0
 private void OnDeleteTapped()
 {
     TransitionCommand.Execute(null);
 }