[Mono-bugs] [Bug 78594][Nor] Changed - [PATCH] 2.0 Serialization Callbacks
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Jul 4 09:36:01 EDT 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by kornelpal at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=78594
--- shadow/78594 2006-07-04 08:48:05.000000000 -0400
+++ shadow/78594.tmp.24709 2006-07-04 09:36:01.000000000 -0400
@@ -50,6 +50,33 @@
http://lists.ximian.com/pipermail/mono-devel-list/2006-June/018723.html
However, it won't help in all cases, because custom formatters
are not aware about this hack, so it's probably useless.
+
+------- Additional Comments From kornelpal at gmail.com 2006-07-04 09:36 -------
+Unfortunately we couldn't use these callbacks to aviod ISerializable
+because they have no SerializationInfo.
+
+On the other hand [OnDeserialized] seems to be a good feature that
+could be used in other classes as well (Not just Color). Note that
+(I think you know but other people may read this.:) there is a
+IDeserializationCallback interface that does the same in MS.NET 1.x
+so implementing it in ObjectManager.RaiseDeserializationEvent() in
+profile 1.0 seems to be a good solution because custom formatter
+will support it. Other callbacks cannot be implemented without
+compatiblity problems.
+
+But note that generally we shouldn't use such hacks because they
+have disadvantages:
+
+If someone wants to create code that runs on Mono and MS.NET as well
+he most likely wants *exactly* the same behaviour on both runtimes.
+So if develops code on Mono, he uses these hacks during development,
+and assumes these hack, then his code won't be MS.NET compatiblie.
+
+If someone only wants to use Mono he can use profile 2.0 and won't
+need any hack.
+
+Another and very unlikely but possible case is that he uses these
+attributes for his own purposes and Mono will mess up his code.
More information about the mono-bugs
mailing list