/// <summary> /// 最新データをダウンロードする /// </summary> /// <returns></returns> private IEnumerator SetLocation(DatLocation Location) { //最新ニュースデータ取得 var Async = ClalisLocationInfomation.GetLocation(); //非同期実行 yield return(Async); //データ取得 ResLpsLocationInfo location = (ResLpsLocationInfo)Async.Current; //データセット Location.SetData(location); //最終更新時刻設定 yield return(Location.LastUpdateTime = LpsDatetimeUtil.Now); }
/// <summary> /// データをセットする /// </summary> public void SetData(ResLpsLocationInfo location) { //取得失敗なら更新しない if (location == null) { return; } //データ更新 this.CountryIsoCode = location.CountryIsoCode; this.CountryName = location.CountryName; this.CountryNameJp = location.CountryNameJp; this.MostSpecificSubdivisionIsoCode = location.MostSpecificSubdivisionIsoCode; this.MostSpecificSubdivisionName = location.MostSpecificSubdivisionName; this.MostSpecificSubdivisionNameJp = location.MostSpecificSubdivisionNameJp; this.CityName = location.CityName; this.CityNameJp = location.CityNameJp; this.PostalCode = location.PostalCode; this.Latitude = location.Latitude; this.Longitude = location.Longitude; }