Пример #1
0
 /// <summary>
 /// Visitor pattern method for <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbProjectExpression" />.
 /// </summary>
 /// <param name="expression"> The DbProjectExpression that is being visited. </param>
 /// <exception cref="T:System.ArgumentNullException">
 /// <paramref name="expression" />
 /// is null
 /// </exception>
 public override void Visit(DbProjectExpression expression)
 {
     Check.NotNull <DbProjectExpression>(expression, nameof(expression));
     this.VisitExpressionBindingPre(expression.Input);
     this.VisitExpression(expression.Projection);
     this.VisitExpressionBindingPost(expression.Input);
 }
Пример #2
0
        /// <summary>
        ///     Visitor pattern method for <see cref="DbProjectExpression" />.
        /// </summary>
        /// <param name="expression"> The DbProjectExpression that is being visited. </param>
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="expression" />
        ///     is null
        /// </exception>
        public override void Visit(DbProjectExpression expression)
        {
            Check.NotNull(expression, "expression");

            VisitExpressionBindingPre(expression.Input);
            VisitExpression(expression.Projection);
            VisitExpressionBindingPost(expression.Input);
        }
Пример #3
0
        public override DbExpression Visit(DbProjectExpression expression)
        {
            Check.NotNull(expression, "expression");

            DbExpression result = expression;

            var input      = VisitExpressionBindingEnterScope(expression.Input);
            var projection = VisitExpression(expression.Projection);

            ExitScope();
            if (!ReferenceEquals(expression.Input, input)
                ||
                !ReferenceEquals(expression.Projection, projection))
            {
                result = CqtBuilder.Project(input, projection);
            }
            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.DbProjectExpression" />
 /// .
 /// </summary>
 /// <returns>A result value of a specific type.</returns>
 /// <param name="expression">
 /// The <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbProjectExpression" /> that is being visited.
 /// </param>
 public abstract TResultType Visit(DbProjectExpression expression);
 /// <summary>
 /// When overridden in a derived class, implements the visitor pattern for
 /// <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbProjectExpression" />
 /// .
 /// </summary>
 /// <param name="expression">
 /// The <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbProjectExpression" /> that is visited.
 /// </param>
 public abstract void Visit(DbProjectExpression expression);
 public override void Visit(DbProjectExpression expression)
 {
 }