C# Class Rebel.Framework.Expressions.Remotion.CustomPartialEvaluatingExpressionTreeVisitor

This is based on PartialEvaluatingExpressionTreeVisitor but with a modification to avoid partially evaluating subtrees if the subtree is a binary expression between and a value. Normally, PartialEvaluatingExpressionTreeVisitor would eagerly compile certain types of subtree to make them "easier" to parse but this would mean we'd lose the metadata contained in the DynamicMemberMetadata.GetMember call and would just end up with the constant False evaluation return value when later visiting the QueryModel.
Unfortunately PartialEvaluatingExpressionTreeVisitor has a private constructor as of Relinq version 1.13.122.1 so some code is duplicated rather than inherited
Inheritance: System.Linq.Expressions.ExpressionTreeVisitor
Mostrar archivo Open project: RebelCMS/rebelcmsxu5 Class Usage Examples

Public Methods

Method Description
EvaluateIndependentSubtrees ( Expression expressionTree ) : Expression
VisitExpression ( Expression expression ) : Expression

Protected Methods

Method Description
EvaluateSubtree ( Expression subtree ) : Expression
VisitUnknownNonExtensionExpression ( Expression expression ) : Expression

Private Methods

Method Description
CustomPartialEvaluatingExpressionTreeVisitor ( Expression treeRoot, Remotion.Linq.Parsing.ExpressionTreeVisitors.TreeEvaluation.PartialEvaluationInfo partialEvaluationInfo ) : System

Method Details

EvaluateIndependentSubtrees() public static method

public static EvaluateIndependentSubtrees ( Expression expressionTree ) : Expression
expressionTree System.Linq.Expressions.Expression
return System.Linq.Expressions.Expression

EvaluateSubtree() protected method

protected EvaluateSubtree ( Expression subtree ) : Expression
subtree System.Linq.Expressions.Expression
return System.Linq.Expressions.Expression

VisitExpression() public method

public VisitExpression ( Expression expression ) : Expression
expression System.Linq.Expressions.Expression
return System.Linq.Expressions.Expression

VisitUnknownNonExtensionExpression() protected method

protected VisitUnknownNonExtensionExpression ( Expression expression ) : Expression
expression System.Linq.Expressions.Expression
return System.Linq.Expressions.Expression