EditableRootListBase OnDeserializedHandlerEditableRootListBase OnDeserializedHandler
Old forum URL: forums.lhotka.net/forums/t/3141.aspx
FireGarden posted on Wednesday, July 04, 2007
I am implementing a business object which is comprised of a few non business objects.
One of the Non business objects members raises an event when one of it's properties changes. I want to cascade this event into its parent business object such that the INotifyPropertyChanged gets called. I should mention i am implementing INotifyPropertyChanged in my Child Business Object.
I can hook up this event between business object and member fields however I am wondering if it will be lost over serialization? If so I would like to be able to extend the deserialization handler such that I can re-wire the member field objects of my business object to call the BO's INotifyPropertyChanged event.
Does that make sense or is a code example required? Essentially I am hooking up events in the child EditableRootListBase object internally and want to be sure they will stay hooked up.
Regards,
Rob
FireGarden replied on Wednesday, July 04, 2007
Perhaps I am not thinking straight.
I believe I could just re-wire the events in an override of OnDeserialized() in my root business object?
ajj3085 replied on Thursday, July 05, 2007
That's the recommended pattern, yes.
Copyright (c) Marimer LLC