ITrackStatus and FieldData question

ITrackStatus and FieldData question

Old forum URL: forums.lhotka.net/forums/t/5044.aspx


JoeFallon1 posted on Wednesday, July 02, 2008

Rocky,

Can you explain why FieldData has a single property named IsDirty that Implements both IsDirty and IsSelfDirty from ITrackStatus? Since they are different concepts I would have expected 2 separate properties in FieldData - one for each.

Joe

 

RockfordLhotka replied on Wednesday, July 02, 2008

Internally CSLA only considers a FieldData to be dirty or not. The distinction between the two concepts is useful to UI developers, and perhaps business object developers, but is not meaningful within CSLA itself - only IsDirty (the state of the object graph) matters.

If you need that distinction for some reason - because you are using IFieldData objects directly in your code, then you'll need to provide your own IFieldData implementation.

robert_m replied on Thursday, July 03, 2008

While we're at this dirty subject, does anyone know if it's possible to get  property level IsDirty status for a registered property from a BusinessBase inherited class ? It would be useful in some scenarios (debugging, for instance) to know not just if the whole object is dirty but if a specific property is dirty...

robert_m replied on Thursday, July 03, 2008

I found it (in 3.5.1). FieldDataManager has a new method:

public bool IsFieldDirty(IPropertyInfo propertyInfo)

Should have read the changelog.....

Copyright (c) Marimer LLC