-
Notifications
You must be signed in to change notification settings - Fork 26
Visualizer treeview
The treeview shows the various objects that make up the expression tree:

The emphasis is on displaying the structure of the expression tree:
-
Not every property becomes a child node; only properties which return specific types which are part of the expression tree's structure, such as
ExpressionandCaseBlock -
There are no child nodes for properties which return collections --
LambdaExpression.Parameters,Block.RuntimeVariables; instead, each element gets its own child node. For example,LambdaExpressionhas aParametersproperty, which returns aReadOnlyCollection<ParameterExpression>; but the tree doesn't have a child node forParameters, only for the individual elements --Parameter[0],Parameter[1]etc.:
Given the following node:

The following properties are shown for each node:
| Description | In highlighted example | Applies to |
| -- | -- | -- | -- |
| Path from parent node | Left - | Every node |
| Node type | MemberAccess | ConstantExpressionDefaultExpression
closed-over variables |
| System.Type of expression | (int) | Expression and subtypesCallSiteBinder and subtypes |
| Name | firstVariable | ParameterExpression if it has oneMemberExpressionMethodCallExpressionLambdaExpression if it has oneMemberBinding -- bound member's name |
| Value of the expression, as a literal | = 5 | ConstantExpressionDefaultExpression
closed-over variables |