public async Task Refresh() { DataDragonService.InvalidateCache(); await LoadData(true); await ChampionsView.Refresh(); await ItemsView.Refresh(); }
public ChampionController( DataDragonService service, IHttpClientFactory httpClientFactory, IWebHostEnvironment environment) { _service = service; _environment = environment; _httpClient = httpClientFactory.CreateClient("Dragon"); }
public async void Run(IBackgroundTaskInstance taskInstance) { BackgroundTaskDeferral deferral = taskInstance.GetDeferral(); DataDragonService.InvalidateCache(); string currentPatchVersion = await DataDragonService.Instance.GetPatchVersionAsync(); if (currentPatchVersion != null && currentPatchVersion != Settings.LastPatchVersion) { Settings.LastPatchVersion = currentPatchVersion; ShowToastNotification(currentPatchVersion); } deferral.Complete(); }