FieldManager.IsFieldDirty on fields with a backing field...
FieldManager.IsFieldDirty on fields with a backing field...Old forum URL: forums.lhotka.net/forums/t/7042.aspx
Eric posted on Wednesday, June 03, 2009If I check the IsFieldDirty function of FieldManager on a field managed by CSLA the function returns expected results. However, when utilizing a backing field checking the function always returns false (I do use SetProperty in the property set). Is this behavior by design?
I looked thorugh the latest book but could not find any information regarding this.
RockfordLhotka replied on Wednesday, June 03, 2009
Yes, this behavior is by design. The field manager is designed to support managed fields.
The helper methods (GetProperty/SetProperty) have overloads for working with private backing fields, but those overloads don't integrate with the field manager beyond using the PropertyInfo<T> object to avoid requiring the string name of the property.
Copyright (c) Marimer LLC