private async Task RefreshPackage(PackageData packageData) { packageData.Refreshing = true; string json; using (var http = new HttpClient()) { //json = await http.GetStringAsync("http://localhost/SimpleTracking.Web/track/sim1.json"); //json = await http.GetStringAsync("http://localhost/SimpleTracking.Web/track/1Z20377A0297737558.json"); json = PackagesDesignerData.GetEmbeddedJsonSample("RealUpsExample"); await Task.Delay(TimeSpan.FromSeconds(3)); } var trackingNumber = packageData.TrackingNumber; JsonConvert.PopulateObject(json, packageData, new JsonSerializerSettings()); if (trackingNumber != null) { packageData.TrackingNumber = trackingNumber; } packageData.LastClientRefresh = DateTime.UtcNow; packageData.Refreshing = false; //_packageCache.CacheTrackingData(packageData); }
public void TestMethod1() { var a = PackagesDesignerData.GetSamplePackageJson(); }