Exemplo n.º 1
0
        S IAstVisitor <T, S> .VisitQuerySelectClause(QuerySelectClause querySelectClause, T data)
        {
            var handler = QuerySelectClauseVisited;

            if (handler != null)
            {
                handler(querySelectClause, data);
            }
            return(VisitChildren(querySelectClause, data));
        }
Exemplo n.º 2
0
            public override AstNode VisitQuerySelectClause(QuerySelectClause querySelectClause)
            {
                if (eatSelect)
                {
                    eatSelect = false;
                    return(currentResult);
                }
                else if (((QueryExpression)querySelectClause.Parent).Clauses.Count > 2 && IsSingleRangeVariable(querySelectClause.Expression))
                {
                    // A simple query that ends with a trivial select should be removed.
                    return(currentResult);
                }

                var param  = CreateParameterForCurrentRangeVariable();
                var lambda = CreateLambda(new[] { param }, VisitNested(querySelectClause.Expression, param));

                return(currentResult.Invoke("Select", lambda));
            }
Exemplo n.º 3
0
 void IAstVisitor.VisitQuerySelectClause(QuerySelectClause querySelectClause)
 {
     Visit(EnterQuerySelectClause, LeaveQuerySelectClause, querySelectClause);
 }
Exemplo n.º 4
0
        protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
        {
            QuerySelectClause o = other as QuerySelectClause;

            return(o != null && this.Expression.DoMatch(o.Expression, match));
        }