Closed michaelsudnik closed 4 years ago
Hello @michaelsudnik ,
Thank you for reporting, we will look at it and try to report the right error if that's possible.
Best Regards,
Jon
Many thanks for looking into it. It would be excellent if you could find a solution to this.
Hello @michaelsudnik ,
Just to let you know that it will take a few days to fix it.
While doing this request, my developer found some cases that we should be able to support with the expando (such as in a dictionary).
He believes he will be able to complete his test on Friday, so we will probably be able to release the fix early next week.
Hi @JonathanMagnan, this is actually a little bit more serious as it is not just a problem when the dynamic property is missing, but also throws the NullReferenceException when it is present as well. It seems to just be a problem with the minus sign in front of the bracket. How close to a fix are you?
Hello @michaelsudnik ,
A version has been released this morning.
I did some tests with your initial case, on my side, I no longer get the problem. If that's not the case for you, please provide us a full example since it might depend on how you pass the Param1
and Param2
.
My developer asked me to not close the issue and re-assign it to him. I believe he wants to fix more cases, I will discuss with him next Monday.
Let me know if everything is fixed for you or there is still some problem.
Hi - thanks it does seem better.
Here is another failure scenario though: https://dotnetfiddle.net/15cAsM
(Property2 does not exist)
Any update on this?
Hello @michaelsudnik ,
We are currently testing the fix, we believe it will be deployed today or tomorrow.
Our library now throw the right error:
System.Dynamic.ExpandoObject' does not contain a definition for 'Property2
Hello @michaelsudnik ,
A new version is now available.
The right error message should be now raised as the code now allow to negate value of type object
(in your case the property that doesn't exist yet).
Let me know if that work as expected.
That seems to be working as expected now. Thanks for your help!
Awesome @michaelsudnik
we are glad everything is working out for you!
feel free to contact us for questions, issues or feedback.
best regards,
Jon
When I try to evaluate the following expression by calling Eval.Execute
-(Param1 - Param2.Property1)
Where Param1 is an Integer and Param2 is an ExpandoObject (Property1 is not defined), I get a NullReferenceException (I think it should report a RuntimeBinderException instead).
E.g, if I evaluate the following expression
Param1 - Param2.Property1
I correctly get a RuntimeBinderException
{"'System.Dynamic.ExpandoObject' does not contain a definition for 'Property1'"}