I'm using the recommended practice of using SuppressListChangedEvents in my ObjectFactory when loading data from my DB into a BusinessListBase/ReadOnlyListBase.
I was surprised to notice that when the object is deserialized on the client the same pattern is not followed, an event is raised for every item added to the collection during deserialization (MobileBindingList.OnSetChilderen() when deserializing $list). Is this behavior expected? I think it would also impact n level undo?
For my case I added a workaround to my BusinessListBase/ReadOnlyListBase base classes:
protected override void OnSetChildren(Csla.Serialization.Mobile.SerializationInfo info, Csla.Serialization.Mobile.MobileFormatter formatter)
// prevent list change events whilst deserializing
If the behavior is not expected I can investigate a suitable fix within csla.
What do you think?
It is not expected, but it is a known bug. I believe there's already an issue for this, and if you'd like to dig into it that'd be great!
Ok, I'll have a look into it.
Copyright (c) Marimer LLC