- Timestamp:
- 03/19/09 11:00:29 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/New Persistence Exploration/Persistence/Persistence/DeSerializer.cs
r1357 r1358 77 77 private readonly Dictionary<Type, Handler> handlers; 78 78 private readonly Stack<IAccessibleObject> compositeStack; 79 private readonly PersistenceConfiguration persistenceConfiguration;79 private readonly Configuration configuration; 80 80 private readonly Dictionary<int, Type> typeIds; 81 81 private List<Thunk> finalFixes; … … 83 83 public DeSerializer( 84 84 IEnumerable<KeyValuePair<string, int>> typeCache, 85 PersistenceConfiguration persistenceConfiguration) {86 this. persistenceConfiguration = persistenceConfiguration;85 Configuration configuration) { 86 this.configuration = configuration; 87 87 id2obj = new Dictionary<int, object>(); 88 88 compositeStack = new Stack<IAccessibleObject>(); … … 116 116 object instance; 117 117 Type type = typeIds[(int)start.TypeId]; 118 if ( persistenceConfiguration.GetDecomposer(type) != null) {118 if (configuration.GetDecomposer(type) != null) { 119 119 instance = new ParentReference(); 120 120 compositeStack.Push(new CustomObject(instance)); … … 132 132 EndToken end = (EndToken)token; 133 133 Type type = typeIds[(int)end.TypeId]; 134 IDecomposer decomposer = persistenceConfiguration.GetDecomposer(type);134 IDecomposer decomposer = configuration.GetDecomposer(type); 135 135 if (decomposer != null) { 136 136 CustomObject customObject = (CustomObject)compositeStack.Pop(); … … 150 150 PrimitiveToken primitive = (PrimitiveToken)token; 151 151 Type type = typeIds[(int)primitive.TypeId]; 152 object value = persistenceConfiguration153 .GetFormatter( XmlFormat.Instance,type)152 object value = configuration 153 .GetFormatter(type) 154 154 .DeSerialize(primitive.SerialData); 155 155 if ( ! value.GetType().IsValueType )
Note: See TracChangeset
for help on using the changeset viewer.