Does the deserialization support ISerializable?

I experienced that it does not help, when I implement ISerializable for my custom activity classes. ISerializable.GetObjectData is not called on deserialization.

Does the deserialization of the workflow foundation not support ISerializable?

[280 byte] By [mario.muja] at [2007-12-24]
# 2
Jon Flanders wrote:

Mario - the short answer is no - http://www.masteringbiztalk.com/blogs/jon/PermaLink,guid,5f4d8c41-73bf-4d7f-93b4-8934130a783b.aspx

Jon,
Just to ensure I understand the answer you provide fully and your article correctly: I take it you mean that implementing ISerializable on types used as activity properties is supported with no issue, but implementing ISerializable on the actual Activity-derived class isn't, right?

TomasRestrepo at 2007-8-31 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 3

Right - implementing ISerializable on any type that derives from Activity will be a total no-op.

The normal serialization rules apply of course to any .net types that you have as fields in your Activity derived classes (or used as DependencyProperties ). If you write those types - you can either mark them with Serializable or implement ISerializable. If you didn't write the type in question you can build a SerializationSurrogateSelector and SerializationSurrogate for that type.

JonFlanders at 2007-8-31 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified