/// <summary> /// Evaluates an expression and applies the results to an existing object /// </summary> /// <param name="Expression">the expression to evaluate</param> /// <param name="existingObject">the object to apply to</param> /// <returns>the evaluated object</returns> public object Evaluate(Expression expression, object existingObject) { Expression oldExpr = Current; _currentExpression = expression; IExpressionHandler handler = Settings.ExpressionHandlers.GetHandler(expression); object result = handler.Evaluate(expression, existingObject, this); _currentExpression = oldExpr ?? _currentExpression; return(result); }
public object Evaluate(Expression Expression, object existingObject) { IExpressionHandler handler = _context.ExpressionHandlers.GetHandler(Expression); return(handler.Evaluate(Expression, existingObject, this)); }