private void SaveAppsToLocalStorage(AppsResponse apps) { foreach (var app in apps.Results) { if (_repository.GetAllWhere(x => x.PackageName == app.PackageName).Any()) { continue; } _repository.Add(app); } }
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(); }); })); }