I wish to serialize or somehow persist the entire state of an instance of a class, my object as it were. But not only that, I wish to persist the state of the call stack including all the local variables' values in every function call in the stack. So that when I de-serialize or restore my object, I can resume the exact state of the object including where I am in the call stack and resume program execution from there.
I have tried using IFormatter and BinaryFormatter, but these seem only to store the member data of the object.
Is it possible to achieve what I'm after? The persisting of the object is to take place during a function call within the object itself (using 'this' as the object to serialize) and the whole object is running across two threads (a main thread on which it was created and a worker thread created by it). Although, this can easily be changed so that the object to be serialized is just on a worker thread on which it was created.
Thanks in advance for any help you can give me with this.