Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/19/09 14:02:35 (16 years ago)
Author:
epitzer
Message:

Add serializer class information to type cache. (#506)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/New Persistence Exploration/Persistence/Persistence/Default/Xml/XmlParser.cs

    r1361 r1362  
    44using System.Collections;
    55using System.IO;
     6using HeuristicLab.Persistence.Core;
    67using HeuristicLab.Persistence.Interfaces;
    78
    89namespace HeuristicLab.Persistence.Default.Xml {
    9 
    1010
    1111  public class XmlParser : IEnumerable<ISerializationToken> {
     
    9191    }
    9292
    93     public static Dictionary<string, int> ParseTypeCache(TextReader reader) {
    94       Dictionary<string, int> typeCache = new Dictionary<string, int>();
     93    public static List<TypeMapping> ParseTypeCache(TextReader reader) {
     94      var typeCache = new List<TypeMapping>();
    9595      XmlReader xmlReader = XmlReader.Create(reader);
    9696      while ( xmlReader.Read() ) {
    97         if (xmlReader.Name == XmlStrings.TYPE) {         
    98           typeCache.Add(xmlReader.GetAttribute("name")
    99           , int.Parse(xmlReader.GetAttribute("id")));
     97        if (xmlReader.Name == XmlStrings.TYPE) {
     98          typeCache.Add(new TypeMapping(
     99            int.Parse(xmlReader.GetAttribute("id")),
     100            xmlReader.GetAttribute("typeName"),
     101            xmlReader.GetAttribute("serializer")));
    100102        }
    101103      }
Note: See TracChangeset for help on using the changeset viewer.