Changeset 1362 for branches/New Persistence Exploration/Persistence/Persistence/Default/Xml/XmlParser.cs
- Timestamp:
- 03/19/09 14:02:35 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/New Persistence Exploration/Persistence/Persistence/Default/Xml/XmlParser.cs
r1361 r1362 4 4 using System.Collections; 5 5 using System.IO; 6 using HeuristicLab.Persistence.Core; 6 7 using HeuristicLab.Persistence.Interfaces; 7 8 8 9 namespace HeuristicLab.Persistence.Default.Xml { 9 10 10 11 11 public class XmlParser : IEnumerable<ISerializationToken> { … … 91 91 } 92 92 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>(); 95 95 XmlReader xmlReader = XmlReader.Create(reader); 96 96 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"))); 100 102 } 101 103 }
Note: See TracChangeset
for help on using the changeset viewer.