Framework-Class-Library-Extension
Framework-Class-Library-Extension copied to clipboard
InitializeEventHandlers OnDeserializing
trafficstars
The constructor is not called for objects which are deserialized. This means event handlers are not initialized for deserialized objects.
I slightly improved on the current solution by also initializing the events in a OnDeserializing method when it is present (OnDeserializingAttribute), however, this method needs to be injected in case it is not present yet.