Changeset 119 for branches/XmlTextWriterBranch/HeuristicLab.Operators.Programmable/ProgrammableOperator.cs
- Timestamp:
- 04/14/08 17:49:47 (16 years ago)
- Location:
- branches/XmlTextWriterBranch
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/XmlTextWriterBranch/HeuristicLab.Operators.Programmable/ProgrammableOperator.cs
r117 r119 192 192 193 193 #region Persistence Methods 194 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { 195 XmlNode node = base.GetXmlNode(name, document, persistedObjects); 196 XmlNode descriptionNode = document.CreateNode(XmlNodeType.Element, "Description", null); 197 descriptionNode.InnerText = myDescription; 198 node.AppendChild(descriptionNode); 199 XmlNode codeNode = document.CreateNode(XmlNodeType.Element, "Code", null); 200 codeNode.InnerText = myCode; 201 node.AppendChild(codeNode); 202 return node; 194 //public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { 195 // XmlNode node = base.GetXmlNode(name, document, persistedObjects); 196 // XmlNode descriptionNode = document.CreateNode(XmlNodeType.Element, "Description", null); 197 // descriptionNode.InnerText = myDescription; 198 // node.AppendChild(descriptionNode); 199 // XmlNode codeNode = document.CreateNode(XmlNodeType.Element, "Code", null); 200 // codeNode.InnerText = myCode; 201 // node.AppendChild(codeNode); 202 // return node; 203 //} 204 public override void Persist(string name, XmlWriter writer, IDictionary<Guid, IStorable> persistedObjects) { 205 base.Persist(name, writer, persistedObjects); 206 writer.WriteStartElement("Description"); 207 writer.WriteValue(myDescription); 208 writer.WriteEndElement(); // </Description> 209 writer.WriteStartElement("Code"); 210 writer.WriteValue(myCode); 211 writer.WriteEndElement(); 203 212 } 204 213 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
Note: See TracChangeset
for help on using the changeset viewer.