This project is read-only.

Collection element updates

Jul 28, 2008 at 2:23 PM
Hello -- I'm curious to know whether i4o handles updates of indexed properties of collection elements. Looking at the code, I'm guessing this is not the case, does anyone have any thoughts on this?

Michael
Aug 1, 2008 at 5:22 PM
Hi frism-

That is certainly an issue I have thought a lot about - and frankly, there is no easy way to do that without requiring implementation of IObservable on the objects somehow, so a collection can know when something changes, hence, reindex is needed.  Funny enough, that same problem is why indexing didn't make it into core .NET 3.5.

That said, if you need that, I did implement that kind of functionality in my collaboration with Rocky Lhotka for CSLA 3.5.  In the indexing support I wrote for that, it handles the scenario because his framework implements event notification when changes to properties occur - thus, making the collection aware enough of changes to children such that reindexing on those properties can be done without explicit reindexing.  www.lhotka.net is the best place to get the bits for that.