[Mono-dev] Serialization Saga.
Kornél Pál
kornelpal at gmail.com
Wed Aug 9 13:39:27 EDT 2006
Hi,
corlib.diff2 in bug http://bugzilla.ximian.com/show_bug.cgi?id=78594
contains some fixes to Robet's patch as well as adding private
OnDeserializedAttribute support to 1.1. See OnDeserializedAttribute.cs in
that bug as well.
Note that IDeserializationCallback does the same as OnDeserializedAttribute
(except that it's an interface so the OnDeserialization method is called
only once while base class methods marked with OnDeserializedAttribute are
called as well). This means that OnDeserializedAttribute can be implemented
safely in 1.1 because formatters will not see any difference. Also means
that other attributes cannot be implemented. Note that
IDeserializationCallback should not be used because it is a public
interface.
I don't think that using __ISerializable is a good idea. Usually we should
architect our classes to be serialization compatible with MS.NET and using
OnDeserializedAttribute performance problems like the one explained for
System.Drawing.Color could be solved because non-serialized field can be
initialized using OnDeserializedAttribute so no special processing is
required in property accessors. (Note that anything can be modified/done in
the method of OnDeserializedAttribute but other uses are less likely to be
important.)
BTW don't you have any plans to review Robert's patch? (It is required to
can support serialization compatibility with MS.NET 2.0 even in our class
library classes.)
Kornél
----- Original Message -----
From: "Miguel de Icaza" <miguel at ximian.com>
To: <mono-devel-list at lists.ximian.com>
Sent: Wednesday, August 09, 2006 7:27 PM
Subject: [Mono-dev] Serialization Saga.
> Hello,
>
> I have put my thoughts and tried to summarize the state of the art
> here:
>
> http://www.mono-project.com/PlanSerialization
>
> Am thorn between the options.
>
> Miguel
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
More information about the Mono-devel-list
mailing list