Enhance implementation of ObservableDictionary so we can re-use this in more places, changes CultureNameCollection to ObservableDictionary, fixes issue with dirty tracking changed property type collections ... this was working by pure fluke before! Fixes more tests.

This commit is contained in:
Shannon
2018-10-19 15:41:28 +11:00
parent 8dfb0dc35c
commit abeb4e04e5
28 changed files with 190 additions and 192 deletions

View File

@@ -836,7 +836,7 @@ namespace Umbraco.Core.Services.Implement
//track the cultures that have changed
var culturesChanging = content.ContentType.VariesByCulture()
? string.Join(",", content.CultureNames.Where(x => x.IsDirty()).Select(x => x.Culture))
? string.Join(",", content.CultureNames.Where(x => x.Value.IsDirty()).Select(x => x.Key))
: null;
//TODO: Currently there's no way to change track which variant properties have changed, we only have change
// tracking enabled on all values on the Property which doesn't allow us to know which variants have changed.
@@ -1069,7 +1069,7 @@ namespace Umbraco.Core.Services.Implement
}
else
{
culturesChanging = string.Join(",", content.PublishNames.Where(x => x.IsDirty()).Select(x => x.Culture));
culturesChanging = string.Join(",", content.PublishNames.Where(x => x.Value.IsDirty()).Select(x => x.Key));
}
}
@@ -1852,7 +1852,7 @@ namespace Umbraco.Core.Services.Implement
//track the cultures changing for auditing
var culturesChanging = content.ContentType.VariesByCulture()
? string.Join(",", content.CultureNames.Where(x => x.IsDirty()).Select(x => x.Culture))
? string.Join(",", content.CultureNames.Where(x => x.Value.IsDirty()).Select(x => x.Key))
: null;
//TODO: Currently there's no way to change track which variant properties have changed, we only have change
// tracking enabled on all values on the Property which doesn't allow us to know which variants have changed.