- Timestamp:
- 03/09/09 12:44:51 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/New Persistence Exploration/Persistence/Persistence/Serializer.cs
r1280 r1314 11 11 private Dictionary<object, int> obj2id; 12 12 private Dictionary<Type, IPrimitiveSerializer> primitiveSerializers; 13 private List<IC ustomSerializer> customSerializers;13 private List<ICompoundSerializer> customSerializers; 14 14 15 15 public Serializer(object obj, IEnumerable<IPrimitiveSerializer> primitiveSerializers) : … … 23 23 this.primitiveSerializers.Add(serializer.Type, serializer); 24 24 } 25 this.customSerializers = new List<IC ustomSerializer>();25 this.customSerializers = new List<ICompoundSerializer>(); 26 26 customSerializers.Add(new EnumerableSerializer()); 27 27 customSerializers.Add(new ArraySerializer()); … … 54 54 this.obj2id.Add(value, id); 55 55 yield return new BeginToken(accessor, id); 56 IC ustomSerializer customSerializer = this.FindCustomSerializer(value.GetType());56 ICompoundSerializer customSerializer = this.FindCustomSerializer(value.GetType()); 57 57 if (customSerializer != null) { 58 58 foreach (object obj in customSerializer.Serialize(value)) { … … 73 73 } 74 74 75 private IC ustomSerializer FindCustomSerializer(Type type) {76 foreach (IC ustomSerializer s in customSerializers) {75 private ICompoundSerializer FindCustomSerializer(Type type) { 76 foreach (ICompoundSerializer s in customSerializers) { 77 77 if (s.CanSerialize(type)) 78 78 return s;
Note: See TracChangeset
for help on using the changeset viewer.