Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

DataContract Serialization RSS

0 replies

Last post Mar 02, 2009 10:42 PM by snortblt

(0)
  • snortblt

    snortblt

    Member

    34 Points

    31 Posts

    DataContract Serialization

    Mar 02, 2009 10:42 PM | LINK

    Hi, I have a complex object graph I'm trying to serialize via DataContractSerializer. Using [DataContract(IsReference=true)] I can handle much of the complexities of the graph structure by persisting object references. However, I also have some event handlers connected between the objects within the graph. I would like to save those as well, or at the very least have something like an OnDeserialized callback when an object is reconstructed so I can fix up the handlers myself. I see no way to do either. I realize there are gotchas associated with serializing events, and I'm prepared to work around those, so please--no lectures on the evils of it. I'm happy to entertain practical alternatives if anyone has suggestions. Thx.

    DataContractSerializer Events EventHandlers