protected internal override Expression VisitSelectMany(SelectManyLinqExpression node) { var source = Visit(node.Source); if (source != node.Source) { return(new SelectManyLinqExpression(node.Method, source, node.CollectionSelector, node.ResultSelector)); } return(node); }
protected internal override Expression VisitSelectMany(SelectManyLinqExpression node) { HasSelect = true; var reducedSource = Visit(node.Source); Visit(node.CollectionSelector); Visit(node.ResultSelector); return(node.Reduce(reducedSource)); }
/// <summary> /// Visits the children of a <see cref="SelectManyLinqExpression"/>. /// </summary> /// <param name="node">The expression to visit.</param> /// <returns>If any children were modified, a new <see cref="SelectManyLinqExpression"/>. Otherwise, the original expression.</returns> protected internal virtual Expression VisitSelectMany(SelectManyLinqExpression node) { var source = Visit(node.Source); var selector = (LambdaExpression)Visit(node.CollectionSelector); var resultSelector = (LambdaExpression)Visit(node.ResultSelector); if (source != node.Source || selector != node.CollectionSelector || resultSelector != node.ResultSelector) { return(new SelectManyLinqExpression(node.Method, source, selector, resultSelector)); } return(node); }