Changeset 151
- Timestamp:
- 04/22/08 17:26:55 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/sources/HeuristicLab.Core/PersistenceManager.cs
r40 r151 34 34 } 35 35 public static XmlNode Persist(IStorable instance, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { 36 return Persist(instance.GetType().Name, instance, document, persistedObjects); 36 string name = instance.GetType().Name; 37 name = name.Replace('`', '_'); 38 return Persist(name, instance, document, persistedObjects); 37 39 } 38 40 public static XmlNode Persist(string name, IStorable instance, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { … … 68 70 public static void Save(IStorable instance, Stream stream) { 69 71 XmlDocument document = PersistenceManager.CreateXmlDocument(); 72 70 73 document.AppendChild(Persist(instance, document, new Dictionary<Guid, IStorable>())); 71 74 document.Save(stream);
Note: See TracChangeset
for help on using the changeset viewer.