コード例 #1
0
ファイル: AppsService.cs プロジェクト: shtpavel/replytest
        private void SaveAppsToLocalStorage(AppsResponse apps)
        {
            foreach (var app in apps.Results)
            {
                if (_repository.GetAllWhere(x => x.PackageName == app.PackageName).Any())
                {
                    continue;
                }

                _repository.Add(app);
            }
        }
コード例 #2
0
        public void GetApps()
        {
            string url = updateURL + accessCodeTextBox.Text;

            Task.Run(() => GetAsync(url, (rawJSON) =>
            {
                try
                {
                    appsData = JsonSerializer.Deserialize <AppsResponse>(rawJSON);
                }
                catch (Exception e)
                {
                    Console.WriteLine($"Can't parse apps/updates response\n{e}");
                }

                Dispatcher.Invoke(() =>
                {
                    RefreshUI();
                });
            }));
        }