private async Task RefreshAirport(Airport airport) { if (IsBusy) { return; } IsBusy = true; await AirportService.GetAirportMetar(airport.Name.ToUpper(), new System.Threading.CancellationToken()).ConfigureAwait(false); }
private async Task GetMetar() { if (!HasNetworkAccess()) { DisplayError(Localization.Error_Occured, Localization.Check_Connection); return; } if (string.IsNullOrEmpty(AirportCode) || IsBusy) { return; } if (!AirportCode.ToUpper().StartsWith(Constants.IdentifierChar)) { AirportCode = AirportCode.Insert(0, Constants.IdentifierChar); } IsBusy = true; await AirportService.GetAirportMetar(AirportCode.ToUpper(), new System.Threading.CancellationToken()).ConfigureAwait(false); }