/// <summary>
 /// Construct a parser bound to the specified workspace with the specified perspective.
 /// </summary>
 internal EntitySqlParser(Perspective perspective)
 {
     Debug.Assert(null != perspective, "null perspective?");
     _perspective = perspective;
 }
Exemplo n.º 2
0
        internal ExpressionConverter(Funcletizer funcletizer, Expression expression)
        {
            DebugCheck.NotNull(funcletizer);
            DebugCheck.NotNull(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)
            var normalizer = new LinqExpressionNormalizer();
            _expression = normalizer.Visit(expression);

            _perspective = funcletizer.RootContext.Perspective;
            _bindingContext = new BindingContext();
            _ignoreInclude = 0;
            _orderByLifter = new OrderByLifter(_aliasGenerator);
        }
 /// <summary>
 ///     Construct a parser bound to the specified workspace with the specified perspective.
 /// </summary>
 internal EntitySqlParser(Perspective perspective)
 {
     DebugCheck.NotNull(perspective);
     _perspective = perspective;
 }