Esempio n. 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)
        {
            Check.NotNull(expression, "expression");

            VisitExpression(expression.Argument);
            VisitExpression(expression.Limit);
        }
        public override DbExpression Visit(DbLimitExpression expression)
        {
            Check.NotNull(expression, "expression");

            DbExpression result = expression;

            var newArgument = VisitExpression(expression.Argument);
            var newLimit    = VisitExpression(expression.Limit);

            if (!ReferenceEquals(expression.Argument, newArgument)
                ||
                !ReferenceEquals(expression.Limit, newLimit))
            {
                Debug.Assert(!expression.WithTies, "Limit.WithTies == true?");
                result = CqtBuilder.Limit(newArgument, newLimit);
            }
            NotifyIfChanged(expression, result);
            return(result);
        }
 /// <summary>
 /// When overridden in a derived class, implements the visitor pattern for
 /// <see
 ///     cref="T:System.Data.Entity.Core.Common.CommandTrees.DbLimitExpression" />
 /// .
 /// </summary>
 /// <returns>A result value of a specific type.</returns>
 /// <param name="expression">
 /// The <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbLimitExpression" /> that is being visited.
 /// </param>
 public abstract TResultType Visit(DbLimitExpression expression);
 /// <summary>
 /// When overridden in a derived class, implements the visitor pattern for
 /// <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbLimitExpression" />
 /// .
 /// </summary>
 /// <param name="expression">
 /// The <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbLimitExpression" /> that is visited.
 /// </param>
 public abstract void Visit(DbLimitExpression expression);
 public override void Visit(DbLimitExpression expression)
 {
 }
Esempio n. 6
0
 /// <summary>
 /// Visitor pattern method for <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbLimitExpression" />.
 /// </summary>
 /// <param name="expression"> The DbLimitExpression that is being visited. </param>
 /// <exception cref="T:System.ArgumentNullException">
 /// <paramref name="expression" />
 /// is null
 /// </exception>
 public override void Visit(DbLimitExpression expression)
 {
     Check.NotNull <DbLimitExpression>(expression, nameof(expression));
     this.VisitExpression(expression.Argument);
     this.VisitExpression(expression.Limit);
 }