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

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

            DbGroupAggregate groupAggregate = (DbGroupAggregate)aggregate;

            return(VisitGroupAggregate(groupAggregate));
        }
Example #2
0
 public virtual void VisitAggregate(DbAggregate aggregate)
 {
   if (aggregate == null) throw new ArgumentException("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(ADP1.CheckArgumentNull(aggregate, "aggregate").Arguments);
 }
 internal void AttachToAstNode(string aggregateName, DbAggregate aggregateDefinition)
 {
     Debug.Assert(aggregateDefinition != null, "aggregateDefinition != null");
     base.AttachToAstNode(aggregateName, aggregateDefinition.ResultType);
     AggregateDefinition = aggregateDefinition;
 }
 /// <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(EntityUtil.CheckArgumentNull(aggregate, "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.
     //Contract.Requires(aggregate != null);
     VisitExpressionList(aggregate.Arguments);
 }