Free cookie consent management tool by TermsFeed Policy Generator

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

Implement a type cache. (#506)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/New Persistence Exploration/Persistence/Persistence/Tokens.cs

    r1339 r1355  
    66  public interface ISerializationToken {
    77  }
    8   public class BeginToken : ISerializationToken {
    9     public readonly DataMemberAccessor Accessor;
     8  public class BeginToken : ISerializationToken {   
     9    public readonly string Name;
     10    public readonly int? TypeId;
    1011    public readonly int? Id;
    11     public BeginToken(DataMemberAccessor accessor, int? id) {
    12       Accessor = accessor;
     12    public BeginToken(string name, int? typeId, int? id) {
     13      Name = name;
     14      TypeId = typeId;
    1315      Id = id;
    1416    }
    1517  }
    1618  public class EndToken : ISerializationToken {
    17     public readonly DataMemberAccessor Accessor;
     19    public readonly string Name;
     20    public readonly int? TypeId;
    1821    public readonly int? Id;
    19     public EndToken(DataMemberAccessor accessor, int? id) {
    20       Accessor = accessor;
     22    public EndToken(string name, int? typeId, int? id) {
     23      Name = name;
     24      TypeId = typeId;
    2125      Id = id;
    2226    }
    2327  }
    2428  public class PrimitiveToken : ISerializationToken {
    25     public readonly DataMemberAccessor Accessor;
    26     public readonly object Data;
     29    public readonly string Name;
     30    public readonly int? TypeId;
    2731    public readonly int? Id;
    28     public PrimitiveToken(DataMemberAccessor accessor, object data, int? id) {
    29       Accessor = accessor;
    30       Data = data;
     32    public readonly object SerialData;
     33    public PrimitiveToken(string name, int? typeId, object serialData, int? id) {
     34      Name = name;
     35      TypeId = typeId;
     36      SerialData = serialData;     
    3137      Id = id;
    3238    }
     
    5460  public class CompositeStart : IParseToken {
    5561    public readonly string Name;
    56     public readonly Type Type;
     62    public readonly string TypeId;
    5763    public readonly int? Id;
    58     public CompositeStart(string name, Type type, int? id) {
     64    public CompositeStart(string name, string typeId, int? id) {
    5965      Name = name;
    60       Type = type;
     66      TypeId = typeId;
    6167      Id = id;
    6268    }
     
    6470  public class CompositeEnd : IParseToken {
    6571    public readonly string Name;
    66     public readonly Type Type;
     72    public readonly string TypeId;
    6773    public readonly int? Id;
    68     public CompositeEnd(string name, Type type, int? id) {
     74    public CompositeEnd(string name, string typeId, int? id) {
    6975      Name = name;
    70       Type = type;
     76      TypeId = typeId;
    7177      Id = id;
    7278    }
     
    7480  public class Primitive : IParseToken {
    7581    public readonly string Name;
    76     public readonly Type Type;
     82    public readonly string TypeId;
    7783    public readonly string SerializedValue;
    7884    public readonly int? Id;
    79     public Primitive(string name, Type type, string serilaizedValue, int? id) {
     85    public Primitive(string name, string typeId, string serilaizedValue, int? id) {
    8086      Name = name;
    81       Type = type;
     87      TypeId = typeId;
    8288      SerializedValue = serilaizedValue;
    8389      Id = id;
Note: See TracChangeset for help on using the changeset viewer.