I have a search tool that takes a complex search string (in fact, an n-level graphical object in JSON) and returns some results. I want to show functionality to other (internal) developers using a LINQ-like mechanism.
Assuming each result is determined by the class Result
I can create methods that look something like this:
Function Search(Expression As Linq.Expression(Of System.Func(Of Result, Boolean))) As IEnumerable(Of Result)
I do not understand how I can go through this parameter Expressionand extract the actual criteria, which I can then form in the object graph to fulfill my request.
Can someone point me to a tutorial / example of how this can be achieved?
For a little background I was able to dig expression far enough to get a recursive structure and I can see .Bodylambda expressions, but when I get up until I do not want to process Leftand Rightthe properties of the type Node ExpressionType.Or, I'm having trouble. The debugger uses the Friend ( BinaryExpressionProxy) class to test an expression that is not available to me, so I clearly omit the wrong route.
Basic source
share