protected virtual DbAggregate VisitAggregate(DbAggregate aggregate)
        {
            // Currently only function or group aggregate are possible
            var functionAggregate = aggregate as DbFunctionAggregate;

            if (functionAggregate != null)
            {
                return(VisitFunctionAggregate(functionAggregate));
            }

            var groupAggregate = (DbGroupAggregate)aggregate;

            return(VisitGroupAggregate(groupAggregate));
        }
示例#2
0
 /// <summary>
 ///     Convenience method to visit the specified <see cref="DbAggregate" />.
 /// </summary>
 /// <param name="aggregate"> The aggregate to visit. </param>
 /// <exception cref="ArgumentNullException">
 ///     <paramref name="aggregate" />
 ///     is null
 /// </exception>
 public virtual void VisitAggregate(DbAggregate aggregate)
 {
     // #433613: PreSharp warning 56506: Parameter 'aggregate' to this public method must be validated: A null-dereference can occur here.
     Check.NotNull(aggregate, "aggregate");
     VisitExpressionList(aggregate.Arguments);
 }
 /// <summary>
 ///     Convenience method to visit the specified <see cref="DbAggregate" />.
 /// </summary>
 /// <param name="aggregate"> The aggregate to visit. </param>
 /// <exception cref="ArgumentNullException">
 ///     <paramref name="aggregate" />
 ///     is null
 /// </exception>
 public virtual void VisitAggregate(DbAggregate aggregate)
 {
     // #433613: PreSharp warning 56506: Parameter 'aggregate' to this public method must be validated: A null-dereference can occur here.
     VisitExpressionList(Check.NotNull(aggregate, "aggregate").Arguments);
 }
 internal void AttachToAstNode(string aggregateName, DbAggregate aggregateDefinition)
 {
     DebugCheck.NotNull(aggregateDefinition);
     base.AttachToAstNode(aggregateName, aggregateDefinition.ResultType);
     AggregateDefinition = aggregateDefinition;
 }
   public virtual void VisitAggregate(DbAggregate aggregate)
 {
   if (aggregate == null) throw new ArgumentException("aggregate");
   VisitExpressionList(aggregate.Arguments);
 }
 internal void AttachToAstNode(string aggregateName, DbAggregate aggregateDefinition)
 {
     Debug.Assert(aggregateDefinition != null, "aggregateDefinition != null");
     base.AttachToAstNode(aggregateName, aggregateDefinition.ResultType);
     AggregateDefinition = aggregateDefinition;
 }
示例#7
0
 /// <summary>
 /// Convenience method to visit the specified <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbAggregate" />.
 /// </summary>
 /// <param name="aggregate"> The aggregate to visit. </param>
 /// <exception cref="T:System.ArgumentNullException">
 /// <paramref name="aggregate" />
 /// is null
 /// </exception>
 public virtual void VisitAggregate(DbAggregate aggregate)
 {
     Check.NotNull <DbAggregate>(aggregate, nameof(aggregate));
     this.VisitExpressionList(aggregate.Arguments);
 }