Changeset 3287


Ignore:
Timestamp:
04/08/10 20:48:38 (11 years ago)
Author:
swagner
Message:

Implemented reviewers' comments (#863).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.3/NamedItemCollection.cs

    r3286 r3287  
    4242    }
    4343
    44     [Storable(Name = "RestoreEvents")]
    45     private object RestoreEvents {
    46       get { return null; }
    47       set { RegisterItemEvents(this); }
    48     }
    49 
    5044    public NamedItemCollection() : base() { }
    5145    public NamedItemCollection(int capacity) : base(capacity) { }
    5246    public NamedItemCollection(IEnumerable<T> collection) : base(collection) {
     47      Initialize();
     48    }
     49
     50    [StorableHook(HookType.AfterDeserialization)]
     51    private void Initialize() {
    5352      RegisterItemEvents(this);
    5453    }
     
    6261      foreach (string key in dict.Keys)
    6362        clone.dict.Add(key, (T)cloner.Clone(dict[key]));
     63      clone.Initialize();
    6464      return clone;
    6565    }
Note: See TracChangeset for help on using the changeset viewer.