Closed
Description
Describe the bug
This library works good with simple expression trees. But for expression trees that run deep, it simply stops returning values, and reverts to displaying non specific information.
To Reproduce
Any multi-step expression that has multiple layers of functions e.g.
f => f.EmailAddress.ToLower() == Request.UserSession().Email.ToLower())
which produces the following tree
Equal (bool)
· Left - Call (string) ToLower
· Object - MemberAccess (string) EmailAddress
· Expression - Parameter (CustomerSummary) f
· Right - Call (string) ToLower
· Object - MemberAccess (string) Email
· Expression - Call (IAuthSession) RequestExtensions.UserSession
· Arguments[0] - MemberAccess (IRequest) Request
· Expression - Constant (CustomerService) = #CustomerService
Expected behavior
I would expect this library to run recursively and capture all levels of the expression tree, not just the top levels, but most importantly, it will display the actual values being used for the query as it does with this simple expression:
var sortCode = "123456";
var accountNumer = "789012345678";
f => f.Code.Contains($"{sortCode}{accountNumer}")
Call (bool) Contains
· Object - MemberAccess (string) Code
· Expression - Parameter (Account) f
· Arguments[0] - Call (string) string.Format
· Arguments[0] - Constant (string) = "{0}{1}"
· Arguments[1] - MemberAccess (string) sortCode = "123456"
· Expression - Constant (<closure>)
· Arguments[2] - MemberAccess (string) accountNumer = "789012345678"
· Expression - Constant (<closure>)
Version info
- .NET Core / .NET Framework version:
- Version: [either NuGet package version / GitHub release version, or commit]
Additional context
Add any other context about the problem here.