private TState FindToState(DynamicSelectorInfo <TState> selectorInfo)
        {
            var to = this.StateSelector(selectorInfo);

            if (to == null)
            {
                return(null);
            }

            if (this.From.ParentStateMachine != to.ParentStateMachine)
            {
                throw new InvalidStateTransitionException(this.From, to);
            }

            return(to);
        }
        bool IInvokableTransition.TryInvoke(EventFireMethod eventFireMethod)
        {
            var selectorInfo = new DynamicSelectorInfo <TState>(this.From, this.Event);
            var to           = this.FindToState(selectorInfo);

            if (to == null)
            {
                return(false);
            }

            if (!this.From.CanTransition(this.Event, to, null))
            {
                return(false);
            }

            var transitionInfo = new TransitionInfo <TState>(this.From, to, this.Event, false, eventFireMethod);

            this.transitionDelegate.CoordinateTransition(transitionInfo, this.Handler);
            return(true);
        }