Changeset 1616


Ignore:
Timestamp:
04/21/09 15:34:44 (12 years ago)
Author:
epitzer
Message:

Fix small bugs found by test suite. (#593)

Location:
trunk/sources/HeuristicLab.Persistence/3.3
Files:
7 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs

    r1612 r1616  
    4141        try {
    4242          iterator = handlers[reader.Name].Invoke();
    43         }
    44         catch (KeyNotFoundException) {
     43        } catch (KeyNotFoundException) {
    4544          throw new InvalidOperationException(String.Format(
    4645            "No handler for XML tag \"{0}\" installed",
     
    5857      if (idString != null)
    5958        id = int.Parse(idString);
    60       yield return new PrimitiveToken(
    61         reader.GetAttribute("name"),
    62         int.Parse(reader.GetAttribute("typeId")),
    63         id,
    64         new XmlString(reader.ReadString()));
     59      string name = reader.GetAttribute("name");
     60      int typeId = int.Parse(reader.GetAttribute("typeId"));
     61      XmlReader inner = reader.ReadSubtree();
     62      inner.Read();
     63      string xml = inner.ReadInnerXml();
     64      inner.Close();     
     65      yield return new PrimitiveToken(name, typeId, id, new XmlString(xml));
    6566    }
    6667
     
    123124      XmlParser parser = new XmlParser(
    124125        new StreamReader(zipFile.GetInputStream(zipFile.GetEntry("data.xml"))));
    125       return deSerializer.Deserialize(parser);
     126      object result = deSerializer.Deserialize(parser);
     127      zipFile.Close();
     128      return result;
    126129    }
    127130  }
  • trunk/sources/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj

    r1613 r1616  
    103103    <Compile Include="Default\DebugString\DebugString.cs" />
    104104    <Compile Include="Default\DebugString\DebugStringFormat.cs" />
     105    <Compile Include="Default\DebugString\Formatters\SByte2DebugStringFormatter.cs" />
     106    <Compile Include="Default\DebugString\Formatters\UInt2DebugStringFormatter.cs" />
     107    <Compile Include="Default\DebugString\Formatters\Long2DebugStringFormatter.cs" />
     108    <Compile Include="Default\DebugString\Formatters\ULong2DebugStringFormatter.cs" />
     109    <Compile Include="Default\DebugString\Formatters\Short2DebugStringFormatter.cs" />
     110    <Compile Include="Default\DebugString\Formatters\UShort2DebugStringFormatter.cs" />
     111    <Compile Include="Default\DebugString\Formatters\Byte2DebugStringFormatter.cs" />
    105112    <Compile Include="Default\DebugString\Formatters\ValueType2DebugStringFormatterBase.cs" />
    106113    <Compile Include="Default\DebugString\Formatters\String2DebugStringFormatter.cs" />
Note: See TracChangeset for help on using the changeset viewer.