/// <summary> /// Loads the "My apps" list and displays it, loading additional data from feeds in the background. /// </summary> private async void UpdateAppListAsync() { foreach (var tile in _tileManagement.UpdateMyApps()) { var feed = await Task.Run(() => _tileManagement.LoadFeedSafe(tile.InterfaceUri)); if (feed != null) { tile.Feed = feed; } } }
private void appListWorker_DoWork(object sender, DoWorkEventArgs e) { var tiles = (IEnumerable <IAppTile>)e.Argument; foreach (var tile in tiles) { if (appListWorker.CancellationPending) { return; } var tile1 = tile; var feed = _tileManagement.LoadFeedSafe(tile.InterfaceUri); if (feed != null) { BeginInvoke(new Action(() => tile1.Feed = feed)); } } }