/// <summary>
        /// Visitor pattern method for <see cref="DbFilterExpression"/>.
        /// </summary>
        /// <param name="expression">The DbFilterExpression that is being visited.</param>
        /// <exception cref="ArgumentNullException"><paramref name="expression"/> is null</exception>
        public override void Visit(DbFilterExpression expression)
        {
            // #433613: PreSharp warning 56506: Parameter 'expression' to this public method must be validated: A null-dereference can occur here.
            EntityUtil.CheckArgumentNull(expression, "expression");

            VisitExpressionBindingPre(expression.Input);
            VisitExpression(expression.Predicate);
            VisitExpressionBindingPost(expression.Input);
        }
        public override DbExpression Visit(DbFilterExpression expression)
        {
            EntityUtil.CheckArgumentNull(expression, "expression");

            DbExpression result = expression;

            DbExpressionBinding input     = this.VisitExpressionBindingEnterScope(expression.Input);
            DbExpression        predicate = this.VisitExpression(expression.Predicate);

            this.ExitScope();
            if (!object.ReferenceEquals(expression.Input, input) ||
                !object.ReferenceEquals(expression.Predicate, predicate))
            {
                result = CqtBuilder.Filter(input, predicate);
            }
            NotifyIfChanged(expression, result);
            return(result);
        }
 /// <summary>
 /// Typed visitor pattern method for DbFilterExpression.
 /// </summary>
 /// <param name="expression">The DbFilterExpression that is being visited.</param>
 /// <returns>An instance of TResultType.</returns>
 public abstract TResultType Visit(DbFilterExpression expression);
Esempio n. 4
0
 /// <summary>
 /// Visitor pattern method for DbFilterExpression.
 /// </summary>
 /// <param name="expression">The DbFilterExpression that is being visited.</param>
 public abstract void Visit(DbFilterExpression expression);