I have a 3rd party struct “XlOper” which is not marked with [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 a 3rd party class, or do I have to create an XlOperSerialized and use it explicitly on both sides of the domain boundry?
Share
If it was me, yes I would just create a separate DTO model that I use on the boundary. It is usually trivial to do, insulates the boundary from implementation changes and versioning issues, and will work well in all such scenarios, regardless of whether remoting, WCF, SOAP or just a wrapped cross-AppDomain call. It will also give you more control over what is serialized (events being a problem, etc).