Changeset 1669 for trunk/sources/HeuristicLab.Data/3.3/BoolData.cs
- Timestamp:
- 04/27/09 14:45:44 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data/3.3/BoolData.cs
r1529 r1669 74 74 return clone; 75 75 } 76 /// <summary>77 /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.78 /// </summary>79 /// <remarks>The boolean value is saved as string in the inner text of the node.</remarks>80 /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>81 /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>82 /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>83 /// <returns>The saved <see cref="XmlNode"/>.</returns>84 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {85 XmlNode node = base.GetXmlNode(name, document, persistedObjects);86 node.InnerText = ToString();87 return node;88 }89 /// <summary>90 /// Loads the persisted boolean value from the specified <paramref name="node"/>.91 /// </summary>92 /// <remarks> The boolean value must be saved as string in the node's inner text93 /// (see <see cref="GetXmlNode"/>).</remarks>94 /// <param name="node">The <see cref="XmlNode"/> where the boolean value is saved.</param>95 /// <param name="restoredObjects">The dictionary of all already restored objects.96 /// (Needed to avoid cycles.)</param>97 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {98 base.Populate(node, restoredObjects);99 Data = bool.Parse(node.InnerText);100 }101 76 } 102 77 }
Note: See TracChangeset
for help on using the changeset viewer.