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));
}
}