internal ExpressionConverter(Funcletizer funcletizer, Expression expression)
        {
            EntityUtil.CheckArgumentNull(funcletizer, "funcletizer");
            EntityUtil.CheckArgumentNull(expression, "expression");

            // Funcletize the expression (identify subexpressions that should be evaluated
            // locally)
            _funcletizer = funcletizer;
            expression = funcletizer.Funcletize(expression, out _recompileRequired);

            // Normalize the expression (replace obfuscated parts of the tree with simpler nodes)
            LinqExpressionNormalizer normalizer = new LinqExpressionNormalizer();
            _expression = normalizer.Visit(expression);

            _perspective = funcletizer.RootContext.Perspective;
            _bindingContext = new BindingContext();
            _ignoreInclude = 0;
            _orderByLifter = new OrderByLifter(_aliasGenerator);
        }
Beispiel #2
0
 internal FuncletizingVisitor(
     Funcletizer funcletizer,
     Func<Expression, bool> isClientConstant,
     Func<Expression, bool> isClientVariable)
 {
     EntityUtil.CheckArgumentNull(funcletizer, "funcletizer");
     EntityUtil.CheckArgumentNull(isClientConstant, "isClientConstant");
     EntityUtil.CheckArgumentNull(isClientVariable, "isClientVariable");
 
     _funcletizer = funcletizer;
     _isClientConstant = isClientConstant;
     _isClientVariable = isClientVariable;
 }
            internal FuncletizingVisitor(
                Funcletizer funcletizer,
                Func<Expression, bool> isClientConstant,
                Func<Expression, bool> isClientVariable)
            {
                //Contract.Requires(funcletizer != null);
                //Contract.Requires(isClientConstant != null);
                //Contract.Requires(isClientVariable != null);

                _funcletizer = funcletizer;
                _isClientConstant = isClientConstant;
                _isClientVariable = isClientVariable;
            }