Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upParseException with Expressions containing Convert method #401
Comments
|
Hello @kyleherzog , Thank you for reporting, we will look at it. Best Regards, Jon Performance Libraries Runtime Evaluation |
|
Hello @kyleherzog , We checked at your issue and I don't think we will support your scenario for now. What you are currently providing is not an expression, but a string representation which is not exactly a lambda expression. For example, the following lambda expression working: var lambdaExpression = "x => Convert.ToInt32(x) == 1";
var expression = DynamicExpressionParser.ParseLambda<long, bool>(new ParsingConfig(), false, lambdaExpression);
var r1 = expression.Compile()(1);But in your case, the expression string shows the following convert as Let me know if that explains correctly why that's currently not working. Best Regards, Jon |
|
@kyleherzog |
I'm trying to take expressions created on a client, convert them to string by calling
ToString, pass the string values to a web endpoint, and then convert them back to expression objects usingDynamicExpressionParser.ParseLambda. In most cases this works. However, if i have an expression that results in aConvertmethod being called, I get the following exception.The following simplified test case exhibits the issue.