public MapContainer(string mapname, IEnumerable <ReplayInfo> tanks) { MapName = mapname; TanksContainers = tanks.GroupBy(x => x.Tank, (tankname, replays) => new TankContainer(tankname, replays)).ToList(); if (ReportInformation.SortBy == ReportInformation.SortMethod.AverageDamage) { TanksContainers.Sort((x, y) => y.AverageDamage - x.AverageDamage); } if (ReportInformation.SortBy == ReportInformation.SortMethod.BattlesCount) { TanksContainers.Sort((x, y) => y.BattlesCount - x.BattlesCount); } }
public IEnumerator <TankContainer> GetEnumerator() { return(TanksContainers.GetEnumerator()); }