- Timestamp:
- 05/05/10 11:37:57 (14 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/EditProductsView.cs
r3624 r3627 32 32 33 33 namespace HeuristicLab.PluginInfrastructure.Advanced { 34 internal partial class ProductEditor: InstallationManagerControl {34 internal partial class EditProductsView : InstallationManagerControl { 35 35 private const string RefreshMessage = "Downloading product and plugin information..."; 36 36 private const string UploadMessage = "Uploading product and plugin information..."; … … 45 45 private HashSet<DeploymentService.ProductDescription> dirtyProducts; 46 46 47 public ProductEditor() {47 public EditProductsView() { 48 48 InitializeComponent(); 49 49 … … 384 384 if (!modifiedPlugins.Contains(plugin)) 385 385 modifiedPlugins.Add(plugin); 386 foreach (var dep in GetAllDependencies(plugin)) {386 foreach (var dep in Util.GetAllDependencies(plugin)) { 387 387 if (!modifiedPlugins.Contains(dep)) 388 388 modifiedPlugins.Add(dep); … … 397 397 if (!modifiedPlugins.Contains(plugin)) 398 398 modifiedPlugins.Add(plugin); 399 foreach (var dep in GetAllDependents(plugin)) {399 foreach (var dep in Util.GetAllDependents(plugin, plugins.Cast<IPluginDescription>())) { 400 400 if (!modifiedPlugins.Contains(dep)) 401 401 modifiedPlugins.Add(dep); … … 412 412 413 413 #region helper 414 private IEnumerable<IPluginDescription> GetAllDependents(IPluginDescription plugin) {415 return from p in plugins416 let matchingEntries = from dep in GetAllDependencies(p)417 where dep.Name == plugin.Name418 where dep.Version == plugin.Version419 select dep420 where matchingEntries.Any()421 select p as IPluginDescription;422 }423 424 private IEnumerable<IPluginDescription> GetAllDependencies(IPluginDescription plugin) {425 HashSet<IPluginDescription> yieldedPlugins = new HashSet<IPluginDescription>();426 foreach (var dep in plugin.Dependencies) {427 foreach (var recDep in GetAllDependencies(dep)) {428 if (!yieldedPlugins.Contains(recDep)) {429 yieldedPlugins.Add(recDep);430 yield return recDep;431 }432 }433 if (!yieldedPlugins.Contains(dep)) {434 yieldedPlugins.Add(dep);435 yield return dep;436 }437 }438 }439 414 private void MarkProductDirty(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription activeProduct) { 440 415 if (!dirtyProducts.Contains(activeProduct)) {
Note: See TracChangeset
for help on using the changeset viewer.