Open DNetORM opened 7 months ago
If you need to implement some kind of 'validation' (without actual evaluation of the expression), it is possible to get a list of expression's parameters in this way:
string exprStr = "pi>what";
var lambdaParser = new LambdaParser();
var expr = lambdaParser.Parse(exprStr);
var exprParams = lambdaParser.GetExpressionParameters(expr);
To validate parameters during evaluation you may use LambdaParser.Eval(string expr, Func<string,object> getVarValue)
overload and implement your own behaviour inside getVarValue
handler.