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); }
/// <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); }
/// <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);
/// <summary> /// Visitor pattern method for DbQuantifierExpression. /// </summary> /// <param name="expression">The DbQuantifierExpression that is being visited.</param> public abstract void Visit(DbQuantifierExpression expression);