Sijin Joseph's blog

My experiences with .Net

Cool class of the day - ISerializationSurrogate

I was doing some research in custom XML serializaton in .Net. The problem is the same as the O-R problem  for database persistence, the difference here is the level of support that .Net provides in helping with that serialization. I stumbled upon a great site for XML related information http://www.topxml.com and while going through some tutorials on that site came across this cool class called ISerializationSurrogate. You can read more about it here http://www.topxml.com/xmlserializer/surrogateselectors.asp

Basically it allows you to move the serialization code away from the object being serialized. A class that implements this interface can act as a surrogate for the class that it serializes. So that's another hook you can use to customize your serialization.
Posted: Feb 15 2005, 04:34 PM by Sijin Joseph | with 3 comment(s)
Filed under:

Comments

TrackBack said:

# February 14, 2005 8:45 PM

TrackBack said:

# February 14, 2005 8:45 PM

Scott Galloway said:

Wow that's a good tutorial! Pretty much covers everything to do with XmlSerialization!
# February 15, 2005 6:49 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)