Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Although it might not answer your question this might solve your problem:</p> <p>I was able to serialize all but one assembly required for deserialization alongside an object structure. The trick is to use reflection to inspect your object structure for types and the assemblies they are defined in. You can then write the assemblies as binary data into an object on serialization and load them into an AppDomain where you can use them to deserialize the rest of the object structure.</p> <p>You have to put the AppDomain handling, the root object and some base classes into an assembly that won't change and everything else is defined in assemblies depending on this "anchor".</p> <p>Upsides:</p> <ul> <li>serialization does not break as long as the anchor assembly does not change</li> <li>can be used for obfuscation, e.g. some required assembly can be hidden in any file</li> <li>can be used for online updates, e.g. ship the assembly with any data</li> <li>as far as I'm concerned no problem with generics </li> </ul> <p>Downsides:</p> <ul> <li>security issues as bootstrapping could be used to inject code (some extra work for assembly SecurityEvidences)</li> <li>AppDomain borders are some work to cross</li> <li>blows up your serialized data (ok, for files - bad, for communication)</li> </ul> <p>But hey, communication does not break unless you have different client versions and then you can do the bootstrapping on handshake.</p> <p>Sorry, I can't provide the code as it's too complex and too specific. But I share some insights in these other answers of mine:</p> <p><a href="https://stackoverflow.com/questions/4545439/difference-between-datacontract-attribute-and-serializable-attribute-in-net/19836842#19836842">difference between DataContract attribute and Serializable attribute in .net</a></p> <p><a href="https://stackoverflow.com/questions/11122052/need-to-hookup-assemblyresolve-event-when-disallowapplicationbaseprobing-true/19702548#19702548">Need to hookup AssemblyResolve event when DisallowApplicationBaseProbing = true</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload