Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/18/09 14:51:38 (16 years ago)
Author:
epitzer
Message:

Implement a type cache. (#506)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/New Persistence Exploration/Persistence/Test/NewSerializationTest.cs

    r1354 r1355  
    2323      }
    2424      writer.Close();
     25      writer = new StreamWriter("test-types.xml");
     26      foreach (string line in xmlFormatter.Format(s.TypeCache)) {
     27        writer.WriteLine(line);
     28        Console.Out.WriteLine(line);
     29      }
     30      writer.Close();
     31     
    2532      XmlParser parser = new XmlParser(new StreamReader("test.xml"));
    26       DeSerializer deSerializer = new DeSerializer();       
     33      DeSerializer deSerializer = new DeSerializer(XmlParser.ParseTypeCache(new StreamReader("test-types.xml")));       
    2734      object o = deSerializer.DeSerialize(parser);
    2835      Root t = CloningFactory.DefaultClone(r);
     
    4249      writer.Close();
    4350      XmlParser parser = new XmlParser(new StreamReader("test2.xml"));
    44       DeSerializer deSerializer = new DeSerializer();
     51      DeSerializer deSerializer = new DeSerializer(XmlParser.ParseTypeCache(new StreamReader("test-types.xml")));             
    4552      object o = deSerializer.DeSerialize(parser);
    4653      Manager n = CloningFactory.DefaultClone(m);
     
    120127
    121128    public static void Main() {     
    122       //Test1();     
     129      Test1();     
    123130      //Test2();
    124131      //SpeedTest();
Note: See TracChangeset for help on using the changeset viewer.