public WindDto GetWind(forecast xml) { if (!xml.wind_dir_degreesSpecified && !xml.wind_speed_ktSpecified) { return(null); } return(new WindDto() { Gust = ParserHelpers.GetValue(xml.wind_gust_ktSpecified, xml.wind_gust_kt), Speed = ParserHelpers.GetValue(xml.wind_speed_ktSpecified, xml.wind_speed_kt), Direction = ParserHelpers.GetValue(xml.wind_dir_degreesSpecified, xml.wind_dir_degrees) }); }
public WindShearDto GetWindSheer(forecast xml) { if (!xml.wind_shear_hgt_ft_aglSpecified && !xml.wind_shear_dir_degreesSpecified && !xml.wind_shear_speed_ktSpecified) { return(null); } return(new WindShearDto() { Direction = ParserHelpers.GetValue(xml.wind_shear_dir_degreesSpecified, xml.wind_shear_dir_degrees), Height = ParserHelpers.GetValue(xml.wind_shear_hgt_ft_aglSpecified, xml.wind_shear_hgt_ft_agl), Speed = ParserHelpers.GetValue(xml.wind_shear_speed_ktSpecified, xml.wind_shear_speed_kt) }); }