Changeset 53
- Timestamp:
- 03/06/08 19:17:54 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data/ItemList_T.cs
r41 r53 43 43 clonedObjects.Add(Guid, clone); 44 44 for (int i = 0; i < list.Count; i++) 45 clone.list.Add((T) Auxiliary.Clone(list[i], clonedObjects));45 clone.list.Add((T) Auxiliary.Clone(list[i], clonedObjects)); 46 46 return clone; 47 47 } 48 48 49 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {49 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { 50 50 XmlNode node = base.GetXmlNode(name, document, persistedObjects); 51 51 for (int i = 0; i < list.Count; i++) … … 53 53 return node; 54 54 } 55 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {55 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) { 56 56 base.Populate(node, restoredObjects); 57 57 for (int i = 0; i < node.ChildNodes.Count; i++) 58 list.Add((T) PersistenceManager.Restore(node.ChildNodes[i], restoredObjects));58 list.Add((T) PersistenceManager.Restore(node.ChildNodes[i], restoredObjects)); 59 59 } 60 60 … … 136 136 #endregion 137 137 138 #region List<T> Methods 139 public void AddRange(IEnumerable<T> collection) { 140 foreach (T obj in collection) { 141 this.Add(obj); 142 } 143 } 144 145 public bool Exists(Predicate<T> match) { 146 return list.Exists(match); 147 } 148 149 public List<T> FindAll(Predicate<T> match) { 150 return list.FindAll(match); 151 } 152 #endregion 153 138 154 public event EventHandler<ItemIndexEventArgs> ItemAdded; 139 155 protected virtual void OnItemAdded(IItem item, int index) {
Note: See TracChangeset
for help on using the changeset viewer.