Hmm, that may be an oversight on my part. I think at one point I allowed your code to retrieve the actual FieldData object, but that was too liberal (breaks encapsulation). But in closing that down it may be that I didn't provide an alternative to get at the IsDirty value.
FieldDataManager should probably have a bool FieldHasChanged(IPropertyInfo) method. I'll add this to the wish list.
We're still on CSLA 3.0, and we implemented this ourself. It's not hard if you are using a code generator where you can easily modify the property setter code generated for your objects.
In our case, we have a "PropertyChanging" method that is called before the backing field for a property is set, and the property setters pass the prior value in as well as the new value. This allows the common BO base class to track individual property changes. At first glance, you'd think you could do the same thing with PropertyHasChanged(), except that the BO will still think it is dirty if the user changes the value back to the original. This might be OK for some applications, but we used whether the property has "really" changed in some validation rules.
Copyright (c) Marimer LLC