public static StatisticsSubjectPerYear <T> Aggregate(IEnumerable <StatisticsSubjectPerYear <T> > statistics) { if (statistics is null) { return(new StatisticsSubjectPerYear <T>()); } var aggregatedStatistics = new StatisticsSubjectPerYear <T>( $"aggregated for {statistics.FirstOrDefault().ICO}", StatisticsPerYear <T> .AggregateStats(statistics)); return(aggregatedStatistics); }
public static StatisticsPerYear <T> AggregateStats <T>(this IEnumerable <StatisticsPerYear <T> > statistics, int[] onlyYears = null) where T : CoreStat, IAddable <T>, new() { return(StatisticsPerYear <T> .AggregateStats(statistics, onlyYears)); }