[Mono-list] ISerializable

Kornél Pál kornelpal at gmail.com
Mon Aug 21 18:19:33 EDT 2006


Hi,

[NonSerialized] has no effect in ISerializable types as fields of 
ISerializable types are not serialized. You didn't post a lof of your code 
that is maked with .... that is trying to serialize one or more objects of 
type Gdk.Pixpuf.

Kornél

----- Original Message ----- 
From: "einKI.ml" <einKI.ml at gmx.net>
To: "mono-list" <mono-list at lists.ximian.com>
Sent: Tuesday, August 22, 2006 12:14 AM
Subject: [Mono-list] ISerializable


> Hi
>
> I tried to serialize a class with the ISerializable interface bacause I
> one member of the class is a Gdk.Pixbuf which is not serializable by
> default.
>
> [Serializable]
> public class ContentImage : ISerializable
> {
> [NonSerialized]
> Gdk.Pixpuf image;
>
> protected SerializablePixbuf(SerializationInfo info,
>      StreamingContext context)
> {
> ....
> }
>
> public void GetObjectData(SerializationInfo info,
>   StreamingContext context)
> {
> ....
> }
> }
>
> But I get a exception that Gdk.Pixbuf is not marked with the
> Serializable Attribute.
> But it should not be serialized because I should have the full
> control with the ISerializable interface and further more it
> is marked as NonSerialized.
>
> Any solution is appreciated
> thx
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list 



More information about the Mono-list mailing list