I noticed SearchByExpression was not always working on properties marked as Indexable. After diggging through the CSLA code I saw BusinessListBase.Child_PropertyChanged was not calling ReIndexItem because my object was never deserialized. This was because it was just created on the client side and not yet saved. Plus, I can't figure out why that check or RaiseListChangedEvents should matter when reindexing properties. I believe the following code needs to have the reindexing part pulled out of the conditional checks for deserialized and RaiseListChangedEvent, while keeping the check for e != null. [EditorBrowsable(EditorBrowsableState.Never)] protected override void Child_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (_deserialized && RaiseListChangedEvents && e != null) { DeferredLoadIndexIfNotLoaded(); if (_indexSet.HasIndexFor(e.PropertyName)) ReIndexItem((C)sender, e.PropertyName); for (int index = 0; index < Count; index++) { if (ReferenceEquals(this[index], sender)) { PropertyDescriptor descriptor = GetPropertyDescriptor(e.PropertyName); if (descriptor != null) OnListChanged(new ListChangedEventArgs( ListChangedType.ItemChanged, index, descriptor)); else OnListChanged(new ListChangedEventArgs( ListChangedType.ItemChanged, index)); } } } base.Child_PropertyChanged(sender, e); } Does that sound reasonable or am I missing something? This seems to be the same issue as this post: http://forums.lhotka.net/forums/thread/32553.aspx I noticed the problem in 3.8.1 and it seems to still exist in 4.0.
The problem won't exist in 4.0, because the whole indexing concept has been removed.
It is a little-used feature, only useful in very narrow scenarios, and you can do indexing using other frameworks (like i4o).
And it complicated the hell out of CSLA collections and has been a maintenance mess ever since it was implemented.
So it is gone. And so is the C5 dependency. It is all goodness and light and joy :)
Copyright (c) Marimer LLC