Example #1
0
 /// <inheritdoc />
 protected override Expression Reduce(QueryClause previous, QueryClause next)
 {
     return(Expression.Block(new[] { Variable },
                             Expression.Assign(Variable, Expression),
                             next.Reduce()
                             ));
 }
Example #2
0
 /// <inheritdoc />
 protected override Expression Reduce(QueryClause previous, QueryClause next)
 {
     return(Expressive.ForEach(
                Variable,
                Enumerable,
                next.Reduce()
                ));
 }
Example #3
0
        internal QueryClause Clone(QueryExpression query, int index)
        {
            QueryClause clone = this.MemberwiseClone() as QueryClause;

            clone.query = query;
            clone.index = index;

            return(clone);
        }
Example #4
0
        /// <inheritdoc />
        protected override Expression VisitChildren(ExpressionVisitor visitor)
        {
            QueryClause[] clauses = new QueryClause[Clauses.Length];

            for (int i = 0; i < clauses.Length; i++)
            {
                clauses[i] = Clauses[i].VisitChildren(visitor);
            }

            return(Update(clauses));
        }
Example #5
0
 /// <inheritdoc />
 protected override Expression Reduce(QueryClause previous, QueryClause next)
 {
     return(Expressive.Yield(Selector));
 }
Example #6
0
 /// <inheritdoc />
 protected override Expression Reduce(QueryClause previous, QueryClause next)
 {
     return(next.Reduce());
 }
Example #7
0
 /// <summary>
 /// Reduces this <see cref="QueryClause"/> into an <see cref="Expression"/>,
 /// given the clauses that preceed and follow it.
 /// </summary>
 protected abstract Expression Reduce(QueryClause previous, QueryClause next);
Example #8
0
 /// <inheritdoc />
 protected override Expression Reduce(QueryClause previous, QueryClause next)
 {
     return(Expression.IfThen(Condition, next.Reduce()));
 }