No, basically. You can't serialize an entire AppDomain
. You could use low level tools to snapshot it (effectively a dump file), but it would never work again. If you want to serialize the state of a complex operation, you'll need to figure out an object model and serialization strategy that supports that.
How do I serialize an AppDomain to disk
-
27-06-2022 - |
Question
I want to serialize the state of separated parts of my .Net application, without writing any complex custom serialization code. The application already uses a separate AppDomains for each "Task", and will unload an AppDomain if it decides the "Task" is misbehaving.
I want to be able to save and load these Tasks from disk, without having to write binary serializers for a complex object tree. I figured the separation provided by an AppDomain might make an universal solution for this possible.
Any idea how I might go about this?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow