A default implementation of an expression tree visitor designed to take an expression tree and rewrite it to the more simplified model supported by the Rebel Framework and its descendent persistence providers.
상속: AbstractExpressionTreeVisitor
 /// <summary>
 /// Rewrites the expression tree to a field predicate tree given an <see cref="AbstractQueryStructureBinder"/> implementation.
 /// </summary>
 /// <param name="expressionToVisit">The expression to visit.</param>
 /// <param name="structureBinder">The structure binder.</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public static Expression RewriteToFieldPredicateTree(Expression expressionToVisit, AbstractQueryStructureBinder structureBinder)
 {
     var visitor = new DefaultExpressionTreeVisitor(structureBinder);
     return visitor.VisitExpression(expressionToVisit);
 }
예제 #2
0
        /// <summary>
        /// Rewrites the expression tree to a field predicate tree given an <see cref="AbstractQueryStructureBinder"/> implementation.
        /// </summary>
        /// <param name="expressionToVisit">The expression to visit.</param>
        /// <param name="structureBinder">The structure binder.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        public static Expression RewriteToFieldPredicateTree(Expression expressionToVisit, AbstractQueryStructureBinder structureBinder)
        {
            var visitor = new DefaultExpressionTreeVisitor(structureBinder);

            return(visitor.VisitExpression(expressionToVisit));
        }