-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use System.Linq.Expressions.ExpressionVisitor where available #182
Use System.Linq.Expressions.ExpressionVisitor where available #182
Conversation
On first glance this seems to play nice regarding #116 and #118, too. The shipped protected internal virtual Expression VisitExtension(Expression node) => node.VisitChildren(this); with e.g. |
@TheConstructor |
5e855e5
to
27a93c7
Compare
This is a breaking change for custom expressions |
@doboczyakos this was merged more than a year ago, there are quite some tests and I used the library during the full time. While it certainly changes things, I would hope, that it is rather for the better (e.g. support for all bundled expression-types). Can you provide a minimal example, that showcases the problem you encountered? Maybe we can make a new issue of that and find a solution, that works for you, too. |
Dear @TheConstructor , I deleted my comment when I found the root cause and a solution, which was the following: When I call Expand() it causes the calling of ReduceAndCheck() which is a breaking change and leads to exception in some cases. |
Hey @doboczyakos, Glad to hear, that you found a way to make it work for you again. I did check how Given that the release is "out there", it may be difficult to change it's version in retrospective, but If you could provide a unit-test, we could be able to prevent similar breaking changes in the future. |
Addresses #122. This also adds support for e.g. Block and Throw expressions, where they are available, making this PR supersede #178.
I tried to build upon the 'expression-visitor'-branch, but found that the visitor-method
VisitMemberAccess
needs to be renamed toVisitMember
to be able to get a working library. I wish they had chosenVisitMemberAccess
, as it better communicates what happens, but they didn't.