/// <summary>
        /// Visitor pattern method for <see cref="DbPropertyExpression"/>.
        /// </summary>
        /// <param name="expression">The DbPropertyExpression that is being visited.</param>
        /// <exception cref="ArgumentNullException"><paramref name="expression"/> is null</exception>
        public override void Visit(DbPropertyExpression expression)
        {
            // #433613: PreSharp warning 56506: Parameter 'expression' to this public method must be validated: A null-dereference can occur here.
            EntityUtil.CheckArgumentNull(expression, "expression");

            if (expression.Instance != null)
            {
                VisitExpression(expression.Instance);
            }
        }
        public override DbExpression Visit(DbPropertyExpression expression)
        {
            EntityUtil.CheckArgumentNull(expression, "expression");

            DbExpression result      = expression;
            DbExpression newInstance = this.VisitExpression(expression.Instance);

            if (!object.ReferenceEquals(expression.Instance, newInstance))
            {
                result = CqtBuilder.Property(newInstance, expression.Property.Name);
            }
            NotifyIfChanged(expression, result);
            return(result);
        }
 /// <summary>
 /// Typed visitor pattern method for DbPropertyExpression.
 /// </summary>
 /// <param name="expression">The DbPropertyExpression that is being visited.</param>
 /// <returns>An instance of TResultType.</returns>
 public abstract TResultType Visit(DbPropertyExpression expression);
Пример #4
0
 /// <summary>
 /// Visitor pattern method for DbPropertyExpression.
 /// </summary>
 /// <param name="expression">The DbPropertyExpression that is being visited.</param>
 public abstract void Visit(DbPropertyExpression expression);