void getData() { if (LocationProvider == null) { LocationProvider = new LocationProvider(this); } Task.Run(async() => { var location = await LocationProvider.GetCurrentLocationCoordnatesAsync(); await WuClient.Shared.GetLocations(Settings.LocationsJson, location); }); }
void getData() { if (LocationProvider == null) { LocationProvider = new LocationProvider(this); } System.Threading.Tasks.Task.Run(async() => { var location = await LocationProvider.GetCurrentLocationCoordnatesAsync(); await WuClient.Shared.GetLocations(location); }); }
void getData() { #if DEBUG Task.Run(async() => await TestDataProvider.InitTestDataAsync(this)); #else if (LocationProvider == null) { LocationProvider = new LocationProvider(this); } Task.Run(async() => { var location = await LocationProvider.GetCurrentLocationCoordnatesAsync(); await WuClient.Shared.GetLocations(Settings.LocationsJson, location); }); #endif }