protected override EvaluationResult EvaluateSimpleExpression(string expression, Func<string, IList<object>, object> methodInvocationCallback) { var evaluator = new RubyScriptExpressionEvaluator(_scriptingManager, new StubCacheManager()); try { var value = evaluator.Evaluate(expression, new[] { new GlobalMethodProvider(methodInvocationCallback) }); return new EvaluationResult(value); } catch (Exception e) { Trace.WriteLine(string.Format("Error during evaluation of '{0}': {1}", expression, e.Message)); return new EvaluationResult(new Error { Message = e.Message, Exception = e }); } }
public CallbackApi(RubyScriptExpressionEvaluator ruleManager, IEnumerable<IGlobalMethodProvider> providers) { _ruleManager = ruleManager; _providers = providers; }
public CallbackApi(RubyScriptExpressionEvaluator ruleManager, IEnumerable <IGlobalMethodProvider> providers) { _ruleManager = ruleManager; _providers = providers; }