Changeset 1574


Ignore:
Timestamp:
04/16/09 17:14:17 (12 years ago)
Author:
epitzer
Message:

Fix problem with loading configuration. Properly initialize and register instance for empty types and make sure Formats have comparable hash codes. (#583)

Location:
trunk/sources/HeuristicLab.Persistence/3.3/Core
Files:
2 edited

Legend:

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

    r1567 r1574  
    44using HeuristicLab.Persistence.Core.Tokens;
    55
    6 namespace HeuristicLab.Persistence.Core { 
     6namespace HeuristicLab.Persistence.Core {
    77
    8   public class Deserializer {   
     8  public class Deserializer {
    99
    1010    class Midwife {
     
    116116      Type type = typeIds[(int)token.TypeId];
    117117      Midwife midwife = parentStack.Pop();
     118      if (midwife.Obj == null)
     119        CreateInstance(midwife);
    118120      midwife.Populate();
    119121      SetValue(token.Name, midwife.Obj);
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/FormatBase.cs

    r1566 r1574  
    2020    }
    2121
     22    public override int GetHashCode() {
     23      return Name.GetHashCode();
     24    }
     25
    2226  }
    2327
Note: See TracChangeset for help on using the changeset viewer.