/// <summary> /// Visitor pattern method for <see cref="DbLimitExpression"/>. /// </summary> /// <param name="expression">The DbLimitExpression that is being visited.</param> /// <exception cref="ArgumentNullException"><paramref name="expression"/> is null</exception> public override void Visit(DbLimitExpression expression) { // #433613: PreSharp warning 56506: Parameter 'expression' to this public method must be validated: A null-dereference can occur here. EntityUtil.CheckArgumentNull(expression, "expression"); VisitExpression(expression.Argument); VisitExpression(expression.Limit); }
public override DbExpression Visit(DbLimitExpression expression) { EntityUtil.CheckArgumentNull(expression, "expression"); DbExpression result = expression; DbExpression newArgument = this.VisitExpression(expression.Argument); DbExpression newLimit = this.VisitExpression(expression.Limit); if (!object.ReferenceEquals(expression.Argument, newArgument) || !object.ReferenceEquals(expression.Limit, newLimit)) { Debug.Assert(!expression.WithTies, "Limit.WithTies == true?"); result = CqtBuilder.Limit(newArgument, newLimit); } NotifyIfChanged(expression, result); return(result); }
/// <summary> /// Visitor pattern method for DbLimitExpression. /// </summary> /// <param name="expression">The DbLimitExpression that is being visited.</param> /// <returns>An instance of TResultType.</returns> public abstract TResultType Visit(DbLimitExpression expression);
/// <summary> /// Visitor pattern method for DbLimitExpression. /// </summary> /// <param name="expression">The DbLimitExpression that is being visited.</param> public abstract void Visit(DbLimitExpression expression);