Example #1
0
        public static WeatherData ToSAM_WeatherData(this TBD.WeatherYear weatherYear)
        {
            if (weatherYear == null)
            {
                return(null);
            }

            WeatherYear weatherYear_SAM = new WeatherYear(weatherYear.year);

            weatherYear_SAM.Update(weatherYear);

            WeatherData result = new WeatherData(weatherYear.name, weatherYear.description, weatherYear.latitude, weatherYear.longitude, weatherYear.altitude);

            result.SetValue(WeatherDataParameter.TimeZone, Core.Query.Description(Core.Query.UTC(weatherYear.timeZone)));

            result.Add(weatherYear_SAM);
            return(result);
        }