コード例 #1
0
        private static Common.Weather.WeatherPeriod ConvertToWeatherPeriod(DailyWeatherResponse source, DailyWeather day) {
            var destination = new Common.Weather.WeatherPeriod();

            destination.TimeFrom = UnixToDateTime(day.Timestamp.Value);
            destination.TimeTo = destination.TimeFrom.AddDays(1);
            destination.Weather = ConvertToWeatherPeriodData(day);

            return destination;
        }
コード例 #2
0
        private static List<Common.Weather.WeatherPeriod> ConvertToWeatherPeriods(DailyWeatherResponse source) {
            var destination = new List<Common.Weather.WeatherPeriod>();

            foreach (var period in source.Weather) {
                destination.Add(ConvertToWeatherPeriod(source, period));
            }

            return destination;
        }