Framework-Class-Library-Extension icon indicating copy to clipboard operation
Framework-Class-Library-Extension copied to clipboard

InitializeEventHandlers OnDeserializing

Open Whathecode opened this issue 11 years ago • 0 comments
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.

Whathecode avatar May 28 '14 01:05 Whathecode