コード例 #1
0
        public override DbExpression Visit(DbQuantifierExpression 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))
            {
                if (DbExpressionKind.All == expression.ExpressionKind)
                {
                    result = CqtBuilder.All(input, predicate);
                }
                else
                {
                    Debug.Assert(expression.ExpressionKind == DbExpressionKind.Any, "DbQuantifierExpression had ExpressionKind other than All or Any?");
                    result = CqtBuilder.Any(input, predicate);
                }
            }
            NotifyIfChanged(expression, result);
            return(result);
        }
コード例 #2
0
        /// <summary>
        /// Visitor pattern method for <see cref="DbQuantifierExpression"/>.
        /// </summary>
        /// <param name="expression">The DbQuantifierExpression that is being visited.</param>
        /// <exception cref="ArgumentNullException"><paramref name="expression"/> is null</exception>
        public override void Visit(DbQuantifierExpression 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);
        }
コード例 #3
0
 /// <summary>
 /// Typed visitor pattern method for DbQuantifierExpression.
 /// </summary>
 /// <param name="expression">The DbQuantifierExpression that is being visited.</param>
 /// <returns>An instance of TResultType.</returns>
 public abstract TResultType Visit(DbQuantifierExpression expression);
コード例 #4
0
 /// <summary>
 /// Visitor pattern method for DbQuantifierExpression.
 /// </summary>
 /// <param name="expression">The DbQuantifierExpression that is being visited.</param>
 public abstract void Visit(DbQuantifierExpression expression);