Refactor - IPublishedContent, converters, fragments (cont)

This commit is contained in:
Stephan
2016-06-29 15:28:40 +02:00
parent 12e5372148
commit a8bb18ecae
26 changed files with 665 additions and 717 deletions

View File

@@ -96,11 +96,6 @@ namespace Umbraco.Web.PublishedCache.NuCache
}
}
public IPublishedProperty CreateFragmentProperty(PublishedPropertyType propertyType, Guid itemKey, bool previewing, PropertyCacheLevel referenceCacheLevel, object sourceValue = null)
{
return _service.CreateFragmentProperty(propertyType, itemKey, previewing, referenceCacheLevel, sourceValue);
}
#endregion
#region IDisposable

View File

@@ -1482,7 +1482,7 @@ AND cmsContentNu.nodeId IS NULL
#region Fragments
public IPublishedProperty CreateFragmentProperty(PublishedPropertyType propertyType, Guid itemKey, bool previewing, PropertyCacheLevel referenceCacheLevel, object sourceValue = null)
public override IPublishedProperty CreateFragmentProperty(PublishedPropertyType propertyType, Guid itemKey, bool previewing, PropertyCacheLevel referenceCacheLevel, object sourceValue = null)
{
return new PublishedFragmentProperty(_facadeAccessor, propertyType, itemKey, previewing, referenceCacheLevel, sourceValue);
}

View File

@@ -5,21 +5,21 @@ using Umbraco.Core.PropertyEditors;
namespace Umbraco.Web.PublishedCache.NuCache
{
internal class PublishedFragmentProperty : PublishedCache.PublishedFragmentProperty
internal class PublishedFragmentProperty : PublishedFragmentPropertyBase
{
private readonly IFacadeAccessor _facadeAccessor;
private string _valuesCacheKey;
// initializes a published item property
public PublishedFragmentProperty(IFacadeAccessor facadeAccessor, PublishedPropertyType propertyType, Guid itemKey, bool previewing, PropertyCacheLevel referenceCacheLevel, object sourceValue = null)
: base(propertyType, itemKey, previewing, referenceCacheLevel, sourceValue)
public PublishedFragmentProperty(IFacadeAccessor facadeAccessor, PublishedPropertyType propertyType, Guid fragmentKey, bool previewing, PropertyCacheLevel referenceCacheLevel, object sourceValue = null)
: base(propertyType, fragmentKey, previewing, referenceCacheLevel, sourceValue)
{
_facadeAccessor = facadeAccessor;
}
// used to cache the CacheValues of this property
internal string ValuesCacheKey => _valuesCacheKey
?? (_valuesCacheKey = CacheKeys.PropertyCacheValues(ItemUid, PropertyTypeAlias, IsPreviewing));
?? (_valuesCacheKey = CacheKeys.PropertyCacheValues(FragmentKey, PropertyTypeAlias, IsPreviewing));
protected override CacheValues GetSnapshotCacheValues()
{