Exemplo n.º 1
0
        private IEnumerable <IActionInvocation> CreateInvocations(IExecutionContext executionContext, IActionContext actionContext)
        {
            ICompiledRule compiledRule = actionContext.CompiledRule;
            var           invocations  = new List <IActionInvocation>();

            foreach (IRuleAction action in compiledRule.Actions)
            {
                var args       = action.GetArguments(executionContext, actionContext);
                var invocation = new ActionInvocation(executionContext, actionContext, action, args);
                invocations.Add(invocation);
            }
            return(invocations);
        }
Exemplo n.º 2
0
        private IEnumerable <ActionInvocation> CreateInvocations(IExecutionContext executionContext, IActionContext actionContext)
        {
            ICompiledRule compiledRule = actionContext.CompiledRule;
            MatchTrigger  trigger      = actionContext.Activation.Trigger;
            var           invocations  = new List <ActionInvocation>();

            foreach (IRuleAction action in compiledRule.Actions)
            {
                if (!trigger.Matches(action.Trigger))
                {
                    continue;
                }

                var invocation = new ActionInvocation(executionContext, actionContext, action);
                invocations.Add(invocation);
            }
            return(invocations);
        }