private void SaveFeeds() { SettingsFeeds.Clear(); SettingsFeeds.AddRange(Feeds); _configurationService.SavePackageSources(Feeds); foreach (var feed in RemovedFeeds) { _configurationService.RemovePackageSource(feed); } }
protected override void OnPropertyChanged(AdvancedPropertyChangedEventArgs e) { if (IsSaving) { return; } if (string.Equals(e.PropertyName, nameof(PackageSources)) && PackageSources is not null) { var storedPackageSources = PackageSources.OfType <NuGetFeed>().ToList(); SettingsFeeds.AddRange(storedPackageSources); Feeds.AddRange(storedPackageSources); // Validate items on first initialization SupressFeedVerificationOnCollectionChanged = false; Feeds.ForEach(async x => await VerifyFeedAsync(x)); } base.OnPropertyChanged(e); }