예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="in"></param>
        /// <returns></returns>
        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
 /// <summary>
 ///
 /// </summary>
 /// <param name="a"></param>
 /// <param name="b"></param>
 /// <returns></returns>
 protected virtual bool CompareIn(InExpression a, InExpression b)
 {
     return(this.Compare(a.Expression, b.Expression) &&
            this.Compare(a.Select, b.Select) &&
            this.CompareExpressionList(a.Values, b.Values));
 }