Updates all Entity models to use SetPropertyValueAndDetectChanges for setting all simple properties so that

tracking changes works the way it is supposed to. Creates a TracksChangesEntityBase class for any other entity
that wants to implement IRememberBeingDirty (now Entity inherits from this). Upgraded a bunch of other entities that
were not tracking changes properly.
This commit is contained in:
Shannon Deminick
2013-03-21 00:05:56 +06:00
parent b96b372400
commit 7ea87638f7
25 changed files with 1056 additions and 330 deletions

View File

@@ -42,8 +42,11 @@ namespace Umbraco.Core.Models
get { return _parentId; }
set
{
_parentId = value;
OnPropertyChanged(ParentIdSelector);
SetPropertyValueAndDetectChanges(o =>
{
_parentId = value;
return _parentId;
}, _parentId, ParentIdSelector);
}
}
@@ -56,8 +59,11 @@ namespace Umbraco.Core.Models
get { return _itemKey; }
set
{
_itemKey = value;
OnPropertyChanged(ItemKeySelector);
SetPropertyValueAndDetectChanges(o =>
{
_itemKey = value;
return _itemKey;
}, _itemKey, ItemKeySelector);
}
}
@@ -70,8 +76,11 @@ namespace Umbraco.Core.Models
get { return _translations; }
set
{
_translations = value;
OnPropertyChanged(TranslationsSelector);
SetPropertyValueAndDetectChanges(o =>
{
_translations = value;
return _translations;
}, _translations, TranslationsSelector);
}
}