You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was testing Lambdaparser.eval() to handle user expression, where values are added to an expandoObject. This way I could create a dynamic object that contains properties which can be used in the expression. But it seems that expandoObjects and dynamic objects are not supported. Here is a snippet of my unit test with the ExpandoObject:
var lambdaParser = new LambdaParser();
var varContext = new Dictionary<string, object>();
dynamic dynamicDiplomas = new ExpandoObject();
dynamicDiplomas.ODB = true; /* this should come from a DB */
dynamicDiplomas.IDB = null;
varContext["diplomas"] = dynamicDiplomas;
expression = "diplomas.ODB || diplomas.IDB != null";
// MissingMemberException
Assert.Throws<System.Reflection.TargetInvocationException>(() => lambdaParser.Eval(expression, varContext));
Is this a known limitation?
The text was updated successfully, but these errors were encountered:
I was testing Lambdaparser.eval() to handle user expression, where values are added to an expandoObject. This way I could create a dynamic object that contains properties which can be used in the expression. But it seems that expandoObjects and dynamic objects are not supported. Here is a snippet of my unit test with the ExpandoObject:
Is this a known limitation?
The text was updated successfully, but these errors were encountered: