Free cookie consent management tool by TermsFeed Policy Generator

Changeset 64


Ignore:
Timestamp:
03/14/08 00:45:29 (17 years ago)
Author:
swagner
Message:

Fixed ticket #58

  • adapted cloning in ItemList to return an instance of ItemList instead of an instance of ItemList<IItem>
Location:
trunk/sources/HeuristicLab.Data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data/ItemList.cs

    r41 r64  
    2828
    2929namespace HeuristicLab.Data {
    30   public class ItemList : ItemList<IItem> { }
     30  public class ItemList : ItemList<IItem> {
     31    public override object Clone(IDictionary<Guid, object> clonedObjects) {
     32      ItemList clone = new ItemList();
     33      clonedObjects.Add(Guid, clone);
     34      for (int i = 0; i < list.Count; i++)
     35        clone.list.Add((IItem)Auxiliary.Clone(list[i], clonedObjects));
     36      return clone;
     37    }
     38  }
    3139}
  • trunk/sources/HeuristicLab.Data/ItemList_T.cs

    r60 r64  
    2929namespace HeuristicLab.Data {
    3030  public class ItemList<T> : ItemBase, IList<T> where T : IItem {
    31     private List<T> list;
     31    protected List<T> list;
    3232
    3333    public ItemList() {
Note: See TracChangeset for help on using the changeset viewer.