S IAstVisitor <T, S> .VisitQuerySelectClause(QuerySelectClause querySelectClause, T data) { var handler = QuerySelectClauseVisited; if (handler != null) { handler(querySelectClause, data); } return(VisitChildren(querySelectClause, data)); }
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)); }
void IAstVisitor.VisitQuerySelectClause(QuerySelectClause querySelectClause) { Visit(EnterQuerySelectClause, LeaveQuerySelectClause, querySelectClause); }
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) { QuerySelectClause o = other as QuerySelectClause; return(o != null && this.Expression.DoMatch(o.Expression, match)); }