public void Process(GlobalMethodContext context) { var ruleContext = new RuleContext { FunctionName = context.FunctionName, Arguments = context.Arguments.ToArray(), Result = context.Result }; _ruleManager._ruleProviders.Process(ruleContext); context.Result = ruleContext.Result; }
public void Process(GlobalMethodContext context) { var ruleContext = new ConditionEvaluationContext { FunctionName = context.FunctionName, Arguments = context.Arguments.ToArray(), Result = context.Result }; _conditionManager._conditions.Evaluate(ruleContext); context.Result = ruleContext.Result; }
private object Evaluate(IEnumerable<IGlobalMethodProvider> globalMethodProviders, string name, IEnumerable<object> args) { var globalMethodContext = new GlobalMethodContext { FunctionName = name, Arguments = args.ToArray(), Result = null }; foreach (var globalMethodProvider in globalMethodProviders) { globalMethodProvider.Process(globalMethodContext); } return globalMethodContext.Result; }
private object Evaluate(IEnumerable <IGlobalMethodProvider> globalMethodProviders, string name, IEnumerable <object> args) { var globalMethodContext = new GlobalMethodContext { FunctionName = name, Arguments = args.ToArray(), Result = null }; foreach (var globalMethodProvider in globalMethodProviders) { globalMethodProvider.Process(globalMethodContext); } return(globalMethodContext.Result); }
public void Process(GlobalMethodContext context) { context.Result = _methodInvocationCallback(context.FunctionName, context.Arguments); }