/// <summary> /// Updates TBD WeatherYear from SAM WeatherYear /// </summary> /// <param name="weatherYear_TBD">Destination TBD WeatherYear</param> /// <param name="weatherYear">Source SAM WeatherYear</param> /// <returns>True if data Updated</returns> public static bool Update(this TBD.WeatherYear weatherYear_TBD, WeatherYear weatherYear) { if (weatherYear_TBD == null || weatherYear == null) { return(false); } List <TBD.WeatherDay> weatherDays_TBD = weatherYear_TBD.WeatherDays(); if (weatherDays_TBD == null) { return(false); } for (int i = 0; i < weatherDays_TBD.Count; i++) { Update(weatherDays_TBD[i], weatherYear[i]); } return(true); }
public static List <TBD.WeatherDay> WeatherDays(this TBD.WeatherYear weatherYear) { if (weatherYear == null) { return(null); } List <TBD.WeatherDay> result = new List <TBD.WeatherDay>(); int index = 1; TBD.WeatherDay weatherDay = weatherYear.weatherDays(index); while (weatherDay != null) { result.Add(weatherDay); index++; weatherDay = weatherYear.weatherDays(index); } return(result); }