Пример #1
0
 /// <summary>
 /// New value will be long.
 /// </summary>
 public static MemoryGroupByOperation AddLongSum(this MemoryGroupByOperation op, string sourceColumn, string targetColumn = null)
 {
     return(op.AddColumnAggregator((groupRows, col) => groupRows.Sum(x => x.GetAs(col, 0L)), sourceColumn, targetColumn));
 }
Пример #2
0
 /// <summary>
 /// New value will be decimal.
 /// </summary>
 public static MemoryGroupByOperation AddDecimalAverage(this MemoryGroupByOperation op, string sourceColumn, string targetColumn = null)
 {
     return(op.AddColumnAggregator((groupRows, col) => groupRows.Average(x => x.GetAs(col, 0m)), sourceColumn, targetColumn));
 }