コード例 #1
0
        /// <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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 /// <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);
コード例 #4
0
 /// <summary>
 /// Visitor pattern method for DbLimitExpression.
 /// </summary>
 /// <param name="expression">The DbLimitExpression that is being visited.</param>
 public abstract void Visit(DbLimitExpression expression);