2010-02-26 Robert Jordan <robertj@gmx.net>
[mono.git] / mcs / class / corlib / System.Runtime.Serialization.Formatters.Binary / ChangeLog
1 2010-02-26  Robert Jordan  <robertj@gmx.net>
2
3         * ObjectReader.cs (ReadType, GetDeserializationType):
4         Add throwOnError parameter that specifies whether to throw an
5         exception if the type/assembly is not found.
6
7         * ObjectReader.cs (ReadTypeMetadata): Ignore unresolvable
8         types while reading the type info. Fixes #430583.
9
10         * ObjectReader.cs (GetDeserializationType): Rethrow caught
11         exceptions as SerializationExceptions.
12
13 2009-10-31  Sebastien Pouliot  <sebastien@ximian.com>
14
15         * BinaryCommon.cs: Disable MONO_REFLECTION_SERIALIZER override 
16         for Moonlight plugin.
17
18 2009-09-30 Gonzalo Paniagua Javier <gonzalo@novell.com>
19
20         * BinaryFormatter.cs: NoCheckDeserialize() was using PeekChar() on a
21         reader when it should only read 1 byte. Also BinaryReader.PeekChar()
22         tries to set the position of hte stream back to where it was before
23         the read, which does not work well with broken Stream
24         implementations like BZip2InputStream (reports CanSeek is true when
25         it really can't seek). Now we do a Read() and then pass the value we
26         read on to the next methods.
27
28         * MessageFormatter.cs: 
29         * ObjectReader.cs: added overloads that take a BinaryElement instead
30         of reading it from the reader. Only for the methods used in
31         NoCheckDeserialize.
32
33         Fixes bug #503435.
34
35 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
36
37         * CodeGenerator.cs: Add synchronization as SRE is not thread safe.
38
39 2008-09-17  Robert Jordan  <robertj@gmx.net>>
40
41         * ObjectReader.cs (ReadTypeMetadata): Replace the check for
42         ISerializable with something less `reflective'.
43         Fixes #421664.
44
45 2008-06-27  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
46
47         * BinaryFormatter.cs: Fix parameter name
48
49 2008-04-26  Jb Evain  <jbevain@novell.com>
50
51         * CodeGenerator.cs: replace usage of new Type [0] by
52         Type.EmptyTypes. Found with Gendarme.
53
54 2008-04-02  Andreas Nahr  <ClassDevelopment@A-SoftTech.com>
55
56         * BinaryFormatter.cs: Fix parameter names
57
58 2007-08-25  Robert Jordan  <robertj@gmx.net>
59
60         * ObjectReader.cs, ObjectWriter.cs, CodeGenerator.cs:
61         Use DateTime.From/ToBinary. Fixes #82400.
62
63 2007-08-25  Alan McGovern  <amcgovern@novell.com>
64
65         * ObjectReader.cs, ObjectWriter.cs, CodeGenerator.cs:
66         Reverted fix for #82400.
67
68 2007-08-25  Robert Jordan  <robertj@gmx.net>
69
70         * ObjectReader.cs, ObjectWriter.cs, CodeGenerator.cs:
71         Use DateTime.From/ToBinary. Fixes #82400.
72
73 2007-08-23  Robert Jordan  <robertj@gmx.net>
74
75         * ObjectReader.cs, ObjectReader.cs: Map between System.MonoType[] and
76         MS.NET's System.RuntimeType[].
77         
78         * ObjectReader.cs (ReadType): When a type couldn't be found, emit
79         a more useful exception.
80
81 2007-05-03  Dick Porter  <dick@ximian.com>
82
83         * BinaryFormatter.cs: Update to 2.0 profile
84
85 2006-12-25  Robert Jordan  <robertj@gmx.net>
86
87         * binary_serialization_format.htm: Update the NET_2_0 format.
88         * BinaryCommon.cs: MethodFlags is actually an int32. Add NET_2_0 flags.
89         * MessageFormatter.cs: Add support for generic method arguments.
90         * ObjectWriter.cs, ObjectReader.cs: Map between System.MonoType and
91         MS.NET's System.RuntimeType.
92
93 2006-12-01  Lluis Sanchez Gual <lluis@novell.com> 
94
95         * MessageFormatter.cs: Include the logical context in the message when
96           throwing an exception. Fixes a compatibility issue with MS.NET.
97
98 2006-10-29  Robert Jordan  <robertj@gmx.net>
99
100         * ObjectWriter.cs, ObjectReader [NET_2_0]:
101         Use the SerializationObjectManager.
102
103 2006-09-05  Raja R Harinath  <rharinath@novell.com>
104
105         Fix #79159
106         * ObjectWriter.cs (WritePrimitiveTypeArray) [NET_2_0]: Encode the
107         'Kind' of each DateTime.
108         * ObjectReader.cs (ReadArrayOfPrimitiveType) [NET_2_0]: Decode the
109         'Kind' of each DateTime.
110
111 2005-12-07  Sebastien Pouliot  <sebastien@ximian.com>
112
113         * BinaryFormatter.cs: Implemented UnsafeDeserialize and 
114         UnsafeDeserializeMethodResponse methods. Fixes last TODO in this
115         namespace (for both 1.1 and 2.0 profiles).
116
117 2005-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
118
119         * ObjectReader.cs: Added null check in GetDeserializationType.
120         Patch by Ben Maurer. Fixes bug #69666.
121
122 2005-12-01  Sebastien Pouliot  <sebastien@ximian.com>
123
124         * BinaryFormatter.cs: Added a demand for SerializationFormatter on 
125         Serialize method (to make some CAS test work correctly).
126
127 2005-05-26  Ben Maurer  <bmaurer@ximian.com>
128
129         * CodeGenerator.cs: Move module creation to cctor to kill double
130         checked locking and typeof locking.
131
132 2005-05-17  Lluis Sanchez Gual  <lluis@ximian.com>
133
134         * CodeGenerator.cs: Don't generate debug info here.
135
136 2005-05-09  Lluis Sanchez Gual  <lluis@ximian.com>
137
138         * ObjectWriter.cs:
139         * CodeGenerator.cs: No need to add the class for inherited fields,
140         since FieldInfo objects returned by the GetSerializableMembers
141         method will already include the class name if needed.
142
143 2005-03-23  Lluis Sanchez Gual  <lluis@ximian.com>
144
145         * BinaryCommon.cs: Added helper method for swapping bytes.
146         * ObjectReader.cs:
147         * ObjectWriter.cs: Implemented serialization of arrays of primitive
148         types using Buffer.BlockCopy to create byffers of data that is written/
149         read in a single call. It's much faster now.
150
151 2005-03-01  Lluis Sanchez Gual  <lluis@ximian.com>
152
153         * BinaryCommon.cs: Found the meaning of two unknown binary elements.
154         * CodeGenerator.cs: Derive generated classes from ClrTypeMetadata
155         instead of TypeMetadata. Added writeTypes parameter to WriteTypeData().
156         * ObjectWriter.cs: Use type and assembly names as keys for the type and
157         assembly caches. This is needed since ISerializable types can provide
158         fake type names (which are mapped to real types by a binder on
159         deserialization).
160         Implemented support for BinaryFormatter.TypeFormat.
161         * BinaryFormatter.cs, MessageFormatter.cs: Implemented support for
162         TypeFormat property.
163         * ObjectReader.cs: Added support for objects serialized without
164         member type information. This fixes bug #73114.
165         If a binder return null, use the default way of loading the type.
166
167 2005-02-25  Lluis Sanchez Gual  <lluis@ximian.com>
168
169         * ObjectReader.cs: In ReadArrayOfPrimitiveType, added a specific
170         read loop for each type. It's much faster and avoids value boxings.
171
172 2005-01-10  Lluis Sanchez Gual  <lluis@ximian.com>
173
174         * BinaryCommon.cs: IntPtr is not a primitive type in the serialization
175         world. This fixes bug #70757.
176
177 2004-12-15  Lluis Sanchez Gual  <lluis@ximian.com>
178
179         * ObjectReader.cs: Use GetField instead of GetMembers. Properties can't
180         be serialized, so it makes no sense to use GetMembers.
181
182 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
183
184         * CodeGenerator.cs: Call new DefineInternalDynamicAssembly method to prevent a race
185         condition in the setting of the CorlibInternal flag.
186
187 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
188
189         * CodeGenerator.cs: Mark the created assembly builder as internal.
190
191 2004-11-29  Lluis Sanchez Gual  <lluis@ximian.com>
192
193         * CodeGenerator.cs: Addded EnumToUnderlying method to get the underlying
194         type of an enum. This fixes bug #69753.
195
196 2004-07-02  Lluis Sanchez Gual  <lluis@ximian.com>
197
198         * BinaryCommon.cs: Added CheckSerializable method.
199         * ObjectWriter.cs: Check for type serializability even for members with
200           null values.
201         
202 2004-05-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
203
204         * ObjectWriter.cs: reduce contention in GetObjectData.
205
206 2004-05-14  Vladimir Vukicevic  <vladimir@pobox.com>
207
208         * binary_serialization_format.htm: renamed filename from having
209           spaces to _'s (checked with lluis)
210
211 2004-05-13  Lluis Sanchez Gual  <lluis@ximian.com>
212
213         * ObjectWriter.cs: Fixed and Simplified WriteGenericArray and 
214           WriteSingleDimensionArrayElements. This also fixes bug #58345.
215
216 2004-05-03  Lluis Sanchez Gual  <lluis@ximian.com>
217
218         * MessageFormatter.cs: In the all-are-primitive case, serialize Args, 
219           not OutArgs.
220
221 2004-04-28  Lluis Sanchez Gual <lluis@ximian.com>
222
223         * MessageFormatter.cs: Serialize Args, not OutArgs, like in MS.NET.
224
225 2004-04-26  Lluis Sanchez Gual <lluis@ximian.com>
226
227         * ObjectReader.cs, ObjectWriter.cs: FIXME cleaning.
228
229 2004-04-20  Lluis Sanchez Gual <lluis@ximian.com>
230
231         * CodeGenerator.cs, ObjectReader.cs, ObjectWriter.cs: Serialize decimals
232           as strings, like in MS.NET. This fixes bug #57186.
233
234 2004-02-23  Lluis Sanchez Gual <lluis@ximian.com>
235
236         * BinaryCommon.cs: Added UseReflectionSerialization property.
237         * CodeGenerator.cs, ObjectWriter.cs: When serializing the name of an 
238           inherited field, prefix the name with the class name. This fixes #54439.
239           Moved check for reflection serialization variable to BinaryCommon.
240         
241 2004-02-17  Lluis Sanchez Gual <lluis@ximian.com>
242
243         * ObjectWriter.cs: Factorized some serialization code in new classes, so it
244           is now possible to use fast IL generated classes that use direct access
245           to class fields instead of using reflection.
246         * CodeGenerator.cs: New file. Has several methods used by ObjectWriter to 
247           generate serialization code.
248
249 2004-02-05  Lluis Sanchez Gual <lluis@ximian.com>
250
251         * ObjectWriter.cs: Get the assembly of a member from the member's type, not
252           from the type of the value, because that is the type written in the
253           metadata section of the object.
254
255 2003-12-23  Lluis Sanchez Gual <lluis@ximian.com>
256
257         * ObjectReader.cs: Field names can include the type name if the field
258           belongs to a base type. Take this into account.
259
260 2003-11-26  Lluis Sanchez Gual <lluis@ximian.com>
261
262         * BinaryFormatter.cs: Added missing methods.
263
264 2003-11-20  Lluis Sanchez Gual <lluis@ximian.com>
265
266         * BinaryFormatter.cs, MessageFormatter.cs, ObjectReader.cs: Added support
267           for TypeFilter property.
268
269 2003-11-16  Lluis Sanchez Gual <lluis@ximian.com>
270
271         * BinaryFormatter.cs, MessageFormatter.cs, ObjectWriter.cs: 
272           Implemented support for AssemblyFormat property.
273
274 2003-11-12  Lluis Sanchez Gual <lluis@ximian.com>
275
276         * ObjectReader.cs, ObjectWriter.cs: Changed some GetType calls to "is" checks.
277
278 2003-07-28  Duncan Mak  <duncan@ximian.com>
279
280         * BinaryFormatter.cs (WriteBinaryHeader): changed from public to
281         private.
282
283 2003-07-25  Lluis Sanchez Gual <lluis@ximian.com>
284
285     * MessageFormatter.cs: WriteMethodCall(): It must write all parameters,
286       including ref and out.
287
288 2003-07-24  Lluis Sanchez Gual <lluis@ximian.com>
289
290     * ObjectReader.cs, ObjectWriter.cs, BinaryCommon.cs: Fixed bug #45970.
291
292 2003-07-17  Lluis Sanchez Gual <lluis@ximian.com>
293
294     * ObjectReader.cs: Keep MemberInfo members in type's metadata object, so it is
295       not necessary to query them for every object.
296     * ObjectWriter.cs: If the value being serialized is a value type (not boxed)
297       then there is no need to register it in the ObjectIDGenerator, because it is
298       not possible to have two references to the same value type object.
299
300 2003-05-13  Lluis Sanchez Gual <lluis@ideary.com>
301
302     * ObjectReader.cs: Changed signature of ReadObjectGraph, so now it returns the
303       deserialized object and the headers.
304     * MessageFormatter.cs: The result of the call to the HeaderHandler delegate is
305       now interpreted as the uri of the target object. This seems to be MS.NET
306       behavior.
307         * BinaryFormatter.cs: Deserialize now calls the HeaderHandler delegate,
308           if provided.
309
310 2003-02-25  Lluis Sanchez Gual <lluis@ideary.com>
311
312         * BinaryFormatter.cs: Implemented support for binders.
313     * MessageFormatter.cs: Implemented support for binders.
314     * ObjectReader.cs: Implemented support for binders.
315
316 2003-02-04  Lluis Sanchez Gual <lluis@ideary.com>
317
318     * MessageFormatter.cs: Fixed bug in serialization of arguments.
319     * ObjectReader.cs: Fixed bug causing array of structs to fail.
320
321 2003-02-11  Patrik Torstensson
322
323     * ObjectReader.cs: Fixed root object bug causing object reader to return root object 
324           before fixup. Closes bug #37842.
325
326 2003-02-04  Lluis Sanchez Gual <lluis@ideary.com>
327
328     * MessageFormatter.cs: Corrected some bugs that affected serialization of exceptions
329
330 2003-02-04  Lluis Sanchez Gual <lluis@ideary.com>
331
332     * MessageFormatter.cs: Implemented serialization of message properties.
333
334 2003-01-24  Martin Baulig  <martin@ximian.com>
335
336         * ObjectReader.cs (ReadNextObject): Call
337         RaiseDeserializationEvent() on the ObjectManager when we're done
338         reading the whole graph.
339
340 2003-01-24  Lluis Sanchez Gual <lluis@ideary.com>
341
342     * ObjectWriter.cs, ObjectReader.cs: Added suport for headers. 
343       Corrected encoding of primitive types. Corrected a bug about zero-length arrays. 
344     * MessageFormatter.cs: Added. Implements serialization of messages.
345     * BinaryFormatter.cs: Added serialization of messages.
346     * BinaryCommon.cs: Added enum of codes of primitive types.
347
348 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
349
350         * ObjectWriter.cs: make the exception message more useful.
351
352 2003-01-16  Lluis Sanchez Gual <lluis@ideary.com>
353
354     * BinaryFormatter.cs: implemented Serialize and Deserialize methods.
355     * ObjectReader.cs: added.
356     * ObjectWriter.cs: added.
357     * BinaryCommon.cs. added.
358
359 2002-08-22  Nick Drochak  <ndrochak@gol.com>
360
361         * BinaryArrayTypeEnum.cs: Removed Non-existent enum (must have been
362         from beta days)
363
364 2002-08-18  Dick Porter  <dick@ximian.com>
365
366         * BinaryFormatter.cs: Stubbed out