I have a class that I am serializing. I annotated it using [Serializable] and I am using a binary serializer. Everything is working fine.
But later I introduced new properties that cannot be serialized (say, they contain a lot of mess in the GUI that need not be re-read). I can calculate these properties based on other class properties.
I need to do this two times when I serialize - a clean mess and enter a stable state ready for serialization. And deserialization - again calculate all the necessary properties.
I need to respond to "events", the instance is serialized / deserialized.
However, I cannot find these events because I do not implement the ISerializable interface or the abstract Aserializable class, but only the class atribute [Serializable] .
I do not know when a class is serialized because it does not apply to this class; it is serialized as a field of another class.
Is there a way to respond to these events?
user1018711
source share