System.Activities.Statements.InternalState.TakeTransition C# (CSharp) Method

TakeTransition() private method

private TakeTransition ( NativeActivityContext context, System.Activities.Statements.StateMachineEventManager eventManager, int triggerId ) : void
context NativeActivityContext
eventManager System.Activities.Statements.StateMachineEventManager
triggerId int
return void
        void TakeTransition(NativeActivityContext context, StateMachineEventManager eventManager, int triggerId)
        {
            this.EventManager.Get(context).OnTransition = true;
            InternalTransition transition = this.GetInternalTransition(triggerId);

            if (transition.IsUnconditional)
            {
                Fx.Assert(-1 == eventManager.CurrentConditionIndex, "CurrentConditionIndex should be -1, if the transition is unconditional.");
                this.PrepareForExit(context, this.GetTo(triggerId));
            }
            else
            {
                Fx.Assert(-1 != eventManager.CurrentConditionIndex, "CurrentConditionIndex should not be -1, if the transition is conditional.");
                this.PrepareForExit(context, this.GetTo(triggerId, eventManager.CurrentConditionIndex));
            }
        }