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

StartEvaluateCondition() private method

private StartEvaluateCondition ( NativeActivityContext context, Bookmark bookmark, object value ) : void
context NativeActivityContext
bookmark Bookmark
value object
return void
        void StartEvaluateCondition(NativeActivityContext context, Bookmark bookmark, object value)
        {
            // Start to evaluate conditions of the trigger which represented by currentTriggerIndex
            StateMachineEventManager eventManager = this.EventManager.Get(context);
            int triggerId = eventManager.CurrentBeingProcessedEvent.TriggedId;
            InternalTransition transition = this.GetInternalTransition(triggerId);

            if (transition.IsUnconditional)
            {
                eventManager.CurrentConditionIndex = -1;
                this.TakeTransition(context, eventManager, triggerId);
            }
            else
            {
                eventManager.CurrentConditionIndex = 0;
                context.ScheduleActivity<bool>(
                    this.GetCondition(
                        triggerId,
                        eventManager.CurrentConditionIndex),
                    this.onConditionComplete,
                    null);
            }
        }