public override DbExpression Visit(DbConstantExpression expression)
        {
            EntityUtil.CheckArgumentNull(expression, "expression");

            // Note that it is only safe to call DbConstantExpression.GetValue because the call to
            // DbExpressionBuilder.Constant must clone immutable values (byte[]).
            return(VisitTerminal(expression, newType => CqtBuilder.Constant(newType, expression.GetValue())));
        }
 /// <summary>
 /// Typed visitor pattern method for DbConstantExpression.
 /// </summary>
 /// <param name="expression">The DbConstantExpression that is being visited.</param>
 /// <returns>An instance of TResultType.</returns>
 public abstract TResultType Visit(DbConstantExpression expression);
 /// <summary>
 /// Visitor pattern method for <see cref="DbConstantExpression"/>.
 /// </summary>
 /// <param name="expression">The DbConstantExpression that is being visited.</param>
 /// <exception cref="ArgumentNullException"><paramref name="expression"/> is null</exception>
 public override void Visit(DbConstantExpression expression)
 {
     // #433613: PreSharp warning 56506: Parameter 'expression' to this public method must be validated: A null-dereference can occur here.
     EntityUtil.CheckArgumentNull(expression, "expression");
 }
Пример #4
0
 /// <summary>
 /// Visitor pattern method for DbConstantExpression.
 /// </summary>
 /// <param name="expression">The DbConstantExpression that is being visited.</param>
 public abstract void Visit(DbConstantExpression expression);