How to do third party serialization for communication via AppDomains?

I have a third party structure "XlOper" that is not labeled [Serializable]. I want to copy it to another AppDomain. What's the best way to do this? Can I add an implicit custom serializer to the third party class or do I need to create an XlOperSerialized and use it explicitly on both sides of the scope border?

+3


source to share


1 answer


If it was me, yes, I would just create a separate DTO model that I use on the border. This is usually trivial, insulates the boundary from implementation changes and versioning issues, and will work well in all such scenarios, whether they are being removed, WCF, SOAP, or just a wrapped Cross-AppDomain call. It will also give you more control over serialization (events are a problem, etc.).



+3


source







All Articles