That's an interesting scenario - yes, I can see where the problem comes in here. I'll have to give some thought to a good solution. I don't like the idea of making CheckRules() public, for instance, as that seems like serious overkill.
The real issue is that child objects, in general, may need to know when the collection's contents have changed. Or more broadly, when the parent object has changed. It is up to the child what it might, or might not, do in response to a change in its parent.
So what's really needed, is a mechanism by which a child can know that the parent changed. One solution would be for Core.IEditableCollection to define a method that is invoked by the parent on each child. A default (empty) implementation would be in Core.BusinessBase, but you could override that and call CheckRules() if it was important for your particular object.
Another option that would work today, is that the child automatically has a Parent property, referring to the collection. You could just hook the existing ListChanged event and thus be notified of any changes to the parent collection. In that event handler you could call CheckRules(). That would require casting Parent to IBindingList, and so it isn't as elegant, but it would certainly work.
Copyright (c) Marimer LLC