コード例 #1
0
        protected virtual Expression VisitIn(InExpression @in)
        {
            Expression expr = this.Visit(@in.Expression);

            if (@in.Select != null)
            {
                SelectExpression select = (SelectExpression)this.Visit(@in.Select);
                if (expr != @in.Expression || select != @in.Select)
                {
                    return(new InExpression(expr, select));
                }
            }
            else
            {
                IEnumerable <Expression> values = this.VisitExpressionList(@in.Values);
                if (expr != @in.Expression || values != @in.Values)
                {
                    return(new InExpression(expr, values));
                }
            }
            return(@in);
        }
コード例 #2
0
 protected virtual bool CompareIn(InExpression a, InExpression b)
 {
     return(Compare(a.Expression, b.Expression) &&
            Compare(a.Select, b.Select) &&
            CompareExpressionList(a.Values, b.Values));
 }