Ejemplo n.º 1
0
 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 object send(string name, IList <object> args)
 {
     return(_ruleManager.Evaluate(_providers, name, args));
 }