Ejemplo n.º 1
0
        public override DbExpression Visit(DbFunctionExpression expression)
        {
            Check.NotNull(expression, "expression");

            DbExpression result       = expression;
            var          newArguments = VisitExpressionList(expression.Arguments);
            var          newFunction  = VisitFunction(expression.Function);

            if (!ReferenceEquals(expression.Arguments, newArguments)
                ||
                !ReferenceEquals(expression.Function, newFunction))
            {
                result = CqtBuilder.Invoke(newFunction, newArguments);
            }

            NotifyIfChanged(expression, result);
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Visitor pattern method for <see cref="DbFunctionExpression" />.
        /// </summary>
        /// <param name="expression"> The DbFunctionExpression that is being visited. </param>
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="expression" />
        ///     is null
        /// </exception>
        public override void Visit(DbFunctionExpression expression)
        {
            Check.NotNull(expression, "expression");

            VisitExpressionList(expression.Arguments);
        }
 /// <summary>
 /// When overridden in a derived class, implements the visitor pattern for
 /// <see
 ///     cref="T:System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression" />
 /// .
 /// </summary>
 /// <returns>A result value of a specific type.</returns>
 /// <param name="expression">
 /// The <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression" /> that is being visited.
 /// </param>
 public abstract TResultType Visit(DbFunctionExpression expression);
 /// <summary>
 /// When overridden in a derived class, implements the visitor pattern for
 /// <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression" />
 /// .
 /// </summary>
 /// <param name="expression">
 /// The <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression" /> that is visited.
 /// </param>
 public abstract void Visit(DbFunctionExpression expression);
Ejemplo n.º 5
0
 /// <summary>
 /// Implements the visitor pattern for <see cref="T:System.Data.Common.CommandTrees.DbFunctionExpression"/>.
 /// </summary>
 /// <param name="expression">The <see cref="T:System.Data.Common.CommandTrees.DbFunctionExpression"/> that is visited.</param>
 public override void Visit(System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression expression)
 {
     base.Visit(expression);
     this.functionsUsed.Add(expression.Function);
 }
 public override void Visit(DbFunctionExpression expression)
 {
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Visitor pattern method for <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression" />.
 /// </summary>
 /// <param name="expression"> The DbFunctionExpression that is being visited. </param>
 /// <exception cref="T:System.ArgumentNullException">
 /// <paramref name="expression" />
 /// is null
 /// </exception>
 public override void Visit(DbFunctionExpression expression)
 {
     Check.NotNull <DbFunctionExpression>(expression, nameof(expression));
     this.VisitExpressionList(expression.Arguments);
 }