Interface IDelegationTarget
Indicates that a class can analyze and possibly rewrite an expression tree containing itself. The expression tree will map the delegation target as a parameter expression.
Namespace: Reaqtor.QueryEngine
Assembly: Reaqtor.QueryEngine.Interfaces.dll
Syntax
public interface IDelegationTarget
Methods
CanDelegate(ParameterExpression, Expression)
Checks whether the tree should be rewritten.
Declaration
bool CanDelegate(ParameterExpression node, Expression expression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | node | The parameter expression representing this delegation target. |
System.Linq.Expressions.Expression | expression | The whole subexpression on which to perform the analysis. |
Returns
Type | Description |
---|---|
System.Boolean | True if the tree should be rewritten, false otherwise. |
Delegate(ParameterExpression, Expression)
Rewrites a tree.
Declaration
Expression Delegate(ParameterExpression node, Expression expression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | node | The parameter expression representing this delegation target. |
System.Linq.Expressions.Expression | expression | The whole subexpression on which to perform the rewrite. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | The rewritten tree. |