Commit Graph
29 Commits
Author SHA1 Message Date
Robert Jordan 3a9042c6e5 Resurrect r84839
svn path=/trunk/mcs/; revision=84841
2007-08-25 06:25:01 +00:00
Alan McGovern 4ab5568a5a reverted changes for datetime serialization
svn path=/trunk/mcs/; revision=84840
2007-08-25 02:32:55 +00:00
Robert Jordan 5ef01bea4b In System:
2007-08-25  Robert Jordan  <[email protected]>

	* DateTime.cs: Implement internal To/FromBinary for the 1.1 profile.

In System.Runtime.Serialization.Formatters.Binary:
2007-08-25  Robert Jordan  <[email protected]>

	* ObjectReader.cs, ObjectWriter.cs, CodeGenerator.cs:
	Use DateTime.From/ToBinary. Fixes #82400.


svn path=/trunk/mcs/; revision=84839
2007-08-25 00:46:18 +00:00
Robert Jordan c76ea13748 In .:
2007-08-23  Robert Jordan  <[email protected]>

	* corlib.dll.sources: Added MemberInfoSerializationHolder.cs.

In System.Runtime.Serialization.Formatters.Binary:
2007-08-23  Robert Jordan  <[email protected]>

	* ObjectReader.cs, ObjectReader.cs: Map between System.MonoType[] and
	MS.NET's System.RuntimeType[].
	
	* ObjectReader.cs (ReadType): When a type couldn't be found, emit
	a more useful exception.

In System.Reflection:
2007-08-23  Robert Jordan  <[email protected]>

	* MemberInfoSerializationHolder.cs: created from
	ReflectionSerializationHolder to match MS (fixes bug #80761).
	Add support for	fields, events, properties and generic methods.

	* MonoMethod.cs (GetObjectData): handle generic arguments.

	* MonoGenericMethod.cs: mark as [Serializable].

	* MonoProperty.cs (GetObjectData): implemented.

	* MonoField.cs: ditto.

	* MonoEvent.cs: ditto.


svn path=/trunk/mcs/; revision=84732
2007-08-23 18:40:17 +00:00
Robert Jordan bb653a80a8 In System.Runtime.Remoting.Messaging:
2006-12-25  Robert Jordan  <[email protected]>

	* MethodCall.cs: Add support for generic methods.
	* MethodCall.cs (GetTypeNameFromAssemblyQualifiedName):
	Add support for generic types.
	* ReturnMessage.cs: Fix bug #80371.

In System.Runtime.Serialization.Formatters.Binary:
2006-12-25  Robert Jordan  <[email protected]>

	* binary_serialization_format.htm: Update the NET_2_0 format.
	* BinaryCommon.cs: MethodFlags is actually an int32. Add NET_2_0 flags.
	* MessageFormatter.cs: Add support for generic method arguments.
	* ObjectWriter.cs, ObjectReader.cs: Map between System.MonoType and
	MS.NET's System.RuntimeType.


svn path=/trunk/mcs/; revision=70683
2007-01-08 23:55:18 +00:00
Robert Jordan 7e0fe07971 Change eol-style to native.
svn path=/trunk/mcs/; revision=70681
2007-01-08 23:30:26 +00:00
Robert Jordan 39fbea3fba Normalize the line endings to CRLF.
svn path=/trunk/mcs/; revision=70679
2007-01-08 23:28:04 +00:00
Robert Jordan 83c1b15790 2006-10-29 Robert Jordan <[email protected]>
* ObjectWriter.cs, ObjectReader [NET_2_0]:
	Use the SerializationObjectManager.


svn path=/trunk/mcs/; revision=67110
2006-10-29 20:37:35 +00:00
Raja R Harinath f0af503273 In System.Runtime.Serialization.Formatters.Binary:
Fix #79159
	* ObjectWriter.cs (WritePrimitiveTypeArray) [NET_2_0]: Encode the
	'Kind' of each DateTime.
	* ObjectReader.cs (ReadArrayOfPrimitiveType) [NET_2_0]: Decode the
	'Kind' of each DateTime.

In Test/System.Runtime.Serialization.Formatters.Binary:
	* BinaryFormatterTest.cs (DateTimeArray): New test for
	round-tripping DateTime arrays.

svn path=/trunk/mcs/; revision=64929
2006-09-05 12:10:14 +00:00
Raja R Harinath 045919d65c Make line-endings uniform. Pick the one which changes the least number of lines. Set eol-style=native on files with LF-endings.
svn path=/trunk/mcs/; revision=64923
2006-09-05 11:24:50 +00:00
Lluis Sanchez 5d88607727 2005-05-09 Lluis Sanchez Gual <[email protected]>
* ObjectWriter.cs:
	* CodeGenerator.cs: No need to add the class for inherited fields,
	since FieldInfo objects returned by the GetSerializableMembers
	method will already include the class name if needed.


svn path=/trunk/mcs/; revision=44268
2005-05-09 11:06:06 +00:00
Lluis Sanchez 159038b6fa 2005-03-23 Lluis Sanchez Gual <[email protected]>
* BinaryCommon.cs: Added helper method for swapping bytes.
	* ObjectReader.cs:
	* ObjectWriter.cs: Implemented serialization of arrays of primitive
	types using Buffer.BlockCopy to create byffers of data that is written/
	read in a single call. It's much faster now.


svn path=/trunk/mcs/; revision=42162
2005-03-23 19:11:05 +00:00
Lluis Sanchez 7838d80521 2005-03-01 Lluis Sanchez Gual <[email protected]>
* BinaryCommon.cs: Found the meaning of two unknown binary elements.
	* CodeGenerator.cs: Derive generated classes from ClrTypeMetadata
	instead of TypeMetadata. Added writeTypes parameter to WriteTypeData().
	* ObjectWriter.cs: Use type and assembly names as keys for the type and
	assembly caches. This is needed since ISerializable types can provide
	fake type names (which are mapped to real types by a binder on
	deserialization).
	Implemented support for BinaryFormatter.TypeFormat.
	* BinaryFormatter.cs, MessageFormatter.cs: Implemented support for
	TypeFormat property.
	* ObjectReader.cs: Added support for objects serialized without
	member type information. This fixes bug #73114.
	If a binder return null, use the default way of loading the type.


svn path=/trunk/mcs/; revision=41404
2005-03-03 17:05:26 +00:00
Lluis Sanchez be62236ebf * BinaryCommon.cs: Added CheckSerializable method.
* ObjectWriter.cs: Check for type serializability even for members with
	  null values.

svn path=/trunk/mcs/; revision=30684
2004-07-02 15:25:27 +00:00
Duncan Mak 13d1764537 Add license and copyright to all source files in corlib
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Gonzalo Paniagua Javier 560e4580b9 2004-05-29 Gonzalo Paniagua Javier <[email protected]>
* ObjectWriter.cs: reduce contention in GetObjectData.

svn path=/trunk/mcs/; revision=28439
2004-05-29 14:23:10 +00:00
Lluis Sanchez 9e8bde8303 * ObjectWriter.cs: Fixed and Simplified WriteGenericArray and
WriteSingleDimensionArrayElements. This also fixes bug #58345.

svn path=/trunk/mcs/; revision=27284
2004-05-13 16:05:38 +00:00
Lluis Sanchez 3ea9677f51 * ObjectReader.cs, ObjectWriter.cs: FIXME cleaning.
svn path=/trunk/mcs/; revision=26011
2004-04-26 18:50:16 +00:00
Lluis Sanchez d1948fa79a * CodeGenerator.cs, ObjectReader.cs, ObjectWriter.cs: Serialize decimals
as strings, like in MS.NET. This fixes bug #57186.

svn path=/trunk/mcs/; revision=25740
2004-04-20 18:29:15 +00:00
Lluis Sanchez 66d1ec3032 * BinaryCommon.cs: Added UseReflectionSerialization property.
* CodeGenerator.cs, ObjectWriter.cs: When serializing the name of an
	  inherited field, prefix the name with the class name. This fixes #54439.
	  Moved check for reflection serialization variable to BinaryCommon.

svn path=/trunk/mcs/; revision=23358
2004-02-23 13:21:52 +00:00
Lluis Sanchez 560f947670 * ObjectWriter.cs: Factorized some serialization code in new classes, so it
is now possible to use fast IL generated classes that use direct access
	  to class fields instead of using reflection.
	* CodeGenerator.cs: New file. Has several methods used by ObjectWriter to
	  generate serialization code.

svn path=/trunk/mcs/; revision=23171
2004-02-17 16:16:49 +00:00
Lluis Sanchez 74e64372a5 * ObjectWriter.cs: Get the assembly of a member from the member's type, not
from the type of the value, because that is the type written in the
	  metadata section of the object.

svn path=/trunk/mcs/; revision=22778
2004-02-05 00:36:32 +00:00
Lluis Sanchez 005d5be306 * BinaryFormatter.cs, MessageFormatter.cs, ObjectWriter.cs:
Implemented support for AssemblyFormat property.

svn path=/trunk/mcs/; revision=20085
2003-11-16 22:27:29 +00:00
Lluis Sanchez 4680ad0fa4 ObjectReader.cs, ObjectWriter.cs: Changed some GetType calls to "is" checks.
svn path=/trunk/mcs/; revision=19892
2003-11-12 15:54:08 +00:00
Lluis Sanchez e271cc193c * ObjectReader.cs, ObjectWriter.cs, BinaryCommon.cs: Fixed bug #45970.
svn path=/trunk/mcs/; revision=16602
2003-07-24 12:27:53 +00:00
Lluis Sanchez 82fbf05daa * ObjectReader.cs: Keep MemberInfo members in type's metadata object, so it is
not necessary to query them for every object.
    * ObjectWriter.cs: If the value being serialized is a value type (not boxed)
      then there is no need to register it in the ObjectIDGenerator, because it is
      not possible to have two references to the same value type object.

svn path=/trunk/mcs/; revision=16342
2003-07-17 12:12:26 +00:00
Lluis Sanchez 5195d4cfc0 * ObjectWriter.cs, ObjectReader.cs: Added suport for headers.
Corrected encoding of primitive types. Corrected a bug about zero-length arrays.
* MessageFormatter.cs: Added. Implements serialization of messages.
* BinaryFormatter.cs: Added serialization of messages.
* BinaryCommon.cs: Added enum of codes of primitive types.

svn path=/trunk/mcs/; revision=10864
2003-01-24 11:21:30 +00:00
Gonzalo Paniagua Javier 3a1f655546 2003-01-17 Gonzalo Paniagua Javier <[email protected]>
* ObjectWriter.cs: make the exception message more useful.

svn path=/trunk/mcs/; revision=10626
2003-01-17 16:45:22 +00:00
Lluis Sanchez 23cb51f860 * BinaryFormatter.cs: implemented Serialize and Deserialize methods.
* ObjectReader.cs: added.
* ObjectWriter.cs: added.
* BinaryCommon.cs. added.

svn path=/trunk/mcs/; revision=10617
2003-01-17 14:19:51 +00:00