Changeset 1714


Ignore:
Timestamp:
04/30/09 12:59:24 (12 years ago)
Author:
gkronber
Message:

Removed unnecessary code in PersistenceManager (#339).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.2/PersistenceManager.cs

    r1529 r1714  
    124124      XmlNode rootNode = document.CreateElement("Root");
    125125      document.AppendChild(rootNode);
    126       XmlNode necessaryPluginsNode = document.CreateElement("NecessaryPlugins");
    127       rootNode.AppendChild(necessaryPluginsNode);
    128126      rootNode.AppendChild(Persist(instance, document, dictionary));
    129       // determine the list of necessary plugins for this document
    130       DiscoveryService service = new DiscoveryService();
    131       List<PluginInfo> plugins = new List<PluginInfo>();
    132       foreach(IStorable storeable in dictionary.Values) {
    133         PluginInfo pluginInfo = service.GetDeclaringPlugin(storeable.GetType());
    134         if(!plugins.Contains(pluginInfo)) plugins.Add(pluginInfo);
    135       }
    136       foreach(PluginInfo uniquePlugin in plugins) {
    137         XmlNode necessaryPluginNode = document.CreateElement("Plugin");
    138         XmlAttribute nameAttr = document.CreateAttribute("Name");
    139         nameAttr.Value = uniquePlugin.Name;
    140         XmlAttribute versionAttr = document.CreateAttribute("Version");
    141         versionAttr.Value = uniquePlugin.Version.ToString();
    142         necessaryPluginNode.Attributes.Append(nameAttr);
    143         necessaryPluginNode.Attributes.Append(versionAttr);
    144         necessaryPluginsNode.AppendChild(necessaryPluginNode);
    145       }
    146127      document.Save(stream);
    147128    }
Note: See TracChangeset for help on using the changeset viewer.