/// <summary> /// Метод для получения информации о периодах /// </summary> /// <returns>Информация о периодах</returns> public IList <PeriodInformation> GetPeriodsInformation() { IEnumerable <int> years = Winds.Select(_ => _.WindDate.Year).Distinct(); IList <PeriodInformation> periodsInfos = new List <PeriodInformation>(years.Count()); foreach (int year in years) { IList <Wind> periodWinds = Winds.Where(_ => _.WindDate.Year == year).OrderBy(_ => _.WindDate).ToList(); PeriodInformation periodInfo = new PeriodInformation(periodWinds, year); periodsInfos.Add(periodInfo); } return(periodsInfos); }
private IList <WindType> GetWindTypes() { return(Winds.Select(_ => _.WindType).Distinct().OrderBy(_ => (int)_).ToList()); }