Average function class. It only works with numbers. If you want to apply it on other data types, you need to create your own AggregateFunction by implementing the IAggregateFunc.
Inheritance: IAggregateFunction
Ejemplo n.º 1
0
 private void initializeFunction(AggregateFunction aggregateFunction)
 {
     switch (aggregateFunction)
     {
         case AggregateFunction.Average:
             ColumnAggregateFunction = new Average { DisplayFormatFormula = DisplayFormatFormula };
             break;
         case AggregateFunction.Maximum:
             ColumnAggregateFunction = new Maximum { DisplayFormatFormula = DisplayFormatFormula };
             break;
         case AggregateFunction.Minimum:
             ColumnAggregateFunction = new Minimum { DisplayFormatFormula = DisplayFormatFormula };
             break;
         case AggregateFunction.StdDev:
             ColumnAggregateFunction = new StdDev { DisplayFormatFormula = DisplayFormatFormula };
             break;
         case AggregateFunction.Sum:
             ColumnAggregateFunction = new Sum { DisplayFormatFormula = DisplayFormatFormula };
             break;
         case AggregateFunction.Variance:
             ColumnAggregateFunction = new Variance { DisplayFormatFormula = DisplayFormatFormula };
             break;
         case AggregateFunction.Empty:
             ColumnAggregateFunction = new Empty { DisplayFormatFormula = DisplayFormatFormula };
             break;
         default:
             throw new NotSupportedException("Please select a defined IAggregateFunction.");
     }
 }