Esempio n. 1
0
 /// <inheritdoc />
 protected override Expression Reduce(QueryClause previous, QueryClause next)
 {
     return(Expressive.ForEach(
                Variable,
                Enumerable,
                next.Reduce()
                ));
 }
Esempio n. 2
0
        /// <inheritdoc cref="UnaryExpression.Update(Expression)" select="summary"/>
        public ForEachExpression Update(ParameterExpression variable, Expression enumerable, Expression body, LabelTarget breakTarget, LabelTarget continueTarget)
        {
            if (this.Variable == variable && this.Enumerable == enumerable && this.Body == body && BreakLabel == breakTarget && ContinueLabel == continueTarget)
            {
                return(this);
            }

            return(Expressive.ForEach(variable, enumerable, body, breakTarget, continueTarget));
        }
Esempio n. 3
0
        /// <inheritdoc />
        public override Expression VisitForEachLoopStatement(IForEachLoopStatement operation, LocalBinder argument)
        {
            ParameterExpression variable = VisitLocal(operation.IterationVariable);
            LocalBinder         binder   = argument.Child(operation.IterationVariable, variable);

            return(Expressive.ForEach(variable,
                                      operation.Collection.Accept(this, argument),
                                      operation.Body.Accept(this, binder)
                                      ));
        }