Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/26/10 15:46:10 (15 years ago)
Author:
epitzer
Message:

Always instantiate parent before processing an inner composite. (#888)

File:
1 edited

Legend:

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

    r1859 r2873  
    117117    }
    118118
     119    private void InstantiateParent() {
     120      if (parentStack.Count == 0)
     121        return;
     122      Midwife m = parentStack.Peek();
     123      if (!m.MetaMode && m.Obj == null)
     124        CreateInstance(m);
     125    }
     126
    119127    private void CompositeStartHandler(BeginToken token) {
     128      InstantiateParent();
    120129      Type type = typeIds[(int)token.TypeId];
    121130      try {
     
    193202      } else {
    194203        Midwife m = parentStack.Peek();
    195         if (m.MetaMode == false && m.Obj == null)
     204        if (m.MetaMode == false && m.Obj == null) {
    196205          CreateInstance(m);
     206        }
    197207        m.AddValue(name, value);
    198208      }
Note: See TracChangeset for help on using the changeset viewer.