Пример #1
0
        public override DbExpression Visit(DbConstantExpression expression)
        {
            Check.NotNull(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())));
        }
Пример #2
0
 /// <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)
 {
     Check.NotNull(expression, "expression");
 }
 /// <summary>
 /// When overridden in a derived class, implements the visitor pattern for
 /// <see
 ///     cref="T:System.Data.Entity.Core.Common.CommandTrees.DbConstantExpression" />
 /// .
 /// </summary>
 /// <returns>A result value of a specific type.</returns>
 /// <param name="expression">
 /// The <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbConstantExpression" /> that is being visited.
 /// </param>
 public abstract TResultType Visit(DbConstantExpression expression);
 /// <summary>
 /// When overridden in a derived class, implements the visitor pattern for
 /// <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbConstantExpression" />
 /// .
 /// </summary>
 /// <param name="expression">
 /// The <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbConstantExpression" /> that is visited.
 /// </param>
 public abstract void Visit(DbConstantExpression expression);
 public override void Visit(DbConstantExpression expression)
 {
 }
Пример #6
0
 /// <summary>
 /// Visitor pattern method for <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbConstantExpression" />.
 /// </summary>
 /// <param name="expression"> The DbConstantExpression that is being visited. </param>
 /// <exception cref="T:System.ArgumentNullException">
 /// <paramref name="expression" />
 /// is null
 /// </exception>
 public override void Visit(DbConstantExpression expression)
 {
     Check.NotNull <DbConstantExpression>(expression, nameof(expression));
 }