public ModeContainer(string modename, IEnumerable <ReplayInfo> maps) { ModeName = modename; MapContainers = maps.GroupBy(x => x.Map, (mapname, tank) => new MapContainer(mapname, tank)).ToList(); if (ReportInformation.SortBy == ReportInformation.SortMethod.AverageDamage) { MapContainers.Sort((x, y) => y.AverageDamage - x.AverageDamage); } if (ReportInformation.SortBy == ReportInformation.SortMethod.BattlesCount) { MapContainers.Sort((x, y) => y.BattlesCount - x.BattlesCount); } }
public IEnumerator <MapContainer> GetEnumerator() { return(MapContainers.GetEnumerator()); }