Changeset 1872 for trunk/sources/HeuristicLab.Logging/3.3/Log.cs
- Timestamp:
- 05/20/09 15:06:46 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Logging/3.3/Log.cs
r1530 r1872 26 26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.Logging { … … 32 33 /// </summary> 33 34 public class Log : ItemBase, IVisualizationItem { 35 [Storable] 34 36 private ItemList myItems; 35 37 /// <summary> … … 86 88 ItemsChanged(this, new EventArgs()); 87 89 } 88 89 #region Persistence Methods90 /// <summary>91 /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.92 /// </summary>93 /// <remarks>The items of the current instance are saved as a child node with the tag name94 /// <c>Items</c>.</remarks>95 /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>96 /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>97 /// <param name="persistedObjects">The dictionary of all already persisted objects.98 /// (Needed to avoid cycles.)</param>99 /// <returns>The saved <see cref="XmlNode"/>.</returns>100 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {101 XmlNode node = base.GetXmlNode(name, document, persistedObjects);102 node.AppendChild(PersistenceManager.Persist("Items", Items, document, persistedObjects));103 return node;104 }105 /// <summary>106 /// Loads the persisted item from the specified <paramref name="node"/>.107 /// </summary>108 /// <remarks>Has to be saved in a special way, see <see cref="GetXmlNode"/> for further information.</remarks>109 /// <param name="node">The <see cref="XmlNode"/> where the Log is saved.</param>110 /// <param name="restoredObjects">The dictionary of all already restored objects.111 /// (Needed to avoid cycles.)</param>112 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {113 base.Populate(node, restoredObjects);114 myItems = (ItemList)PersistenceManager.Restore(node.SelectSingleNode("Items"), restoredObjects);115 }116 #endregion117 90 } 118 91 }
Note: See TracChangeset
for help on using the changeset viewer.