Discussion:
ShouldSerialize not called?
(too old to reply)
schneider
2007-02-05 08:29:38 UTC
Permalink
I have a property where ShouldSerialize is not called?

If I use a type converter do these methods still work?

Any ideas would be great.

P.S. I want to serialize progmaticly so the default attribute will not work.

Thanks,

Schneider

<TypeConverter(GetType(ExpandableObjectConverter))> _

Public Class ImageAssociatedHelper

Implements IImageAssociatedStorage

Implements ICloneable

Public Property Image() As Image Implements
IImageAssociatedStorage.Image

Public Function ShouldSerializeImage() As Boolean Implements
AbstractInterfaces.IImageAssociatedStorage.ShouldSerializeImage
schneider
2007-02-16 06:40:24 UTC
Permalink
I solved the problem.

The property "Image" still had a "DefaultValue" attribute on it, which i
guess prevents the should serialize functionality from working, so I removed
it and it worked fine.

Schneider
Post by schneider
I have a property where ShouldSerialize is not called?
If I use a type converter do these methods still work?
Any ideas would be great.
P.S. I want to serialize progmaticly so the default attribute will not work.
Thanks,
Schneider
<TypeConverter(GetType(ExpandableObjectConverter))> _
Public Class ImageAssociatedHelper
Implements IImageAssociatedStorage
Implements ICloneable
Public Property Image() As Image Implements
IImageAssociatedStorage.Image
Public Function ShouldSerializeImage() As Boolean Implements
AbstractInterfaces.IImageAssociatedStorage.ShouldSerializeImage
Loading...