Пример #1
0
        public async Task Refresh()
        {
            DataDragonService.InvalidateCache();
            await LoadData(true);

            await ChampionsView.Refresh();

            await ItemsView.Refresh();
        }
Пример #2
0
 public ChampionController(
     DataDragonService service,
     IHttpClientFactory httpClientFactory,
     IWebHostEnvironment environment)
 {
     _service     = service;
     _environment = environment;
     _httpClient  = httpClientFactory.CreateClient("Dragon");
 }
Пример #3
0
        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();
        }