コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: Extensions.cs プロジェクト: HlidacStatu/HlidacStatu
 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));
 }