Quantcast
Channel: Managed Extensibility Framework
Viewing all articles
Browse latest Browse all 265

New Post: ImportConstructor in class that is being serialized/deserialized

$
0
0
You could switch to property imports and fix them up post-deserialization, but I'd be concerned about the fragility of mixing parts and serialization this way. As a rule of thumb, things with a 'persistent identity' make poor parts- MEF really wants to be in control of which instance is used where.

In this situation I usually try to separate the serialized and non-serialized data into different (related) classes. This might work for you..?

Good luck!
Nick

Viewing all articles
Browse latest Browse all 265

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>