Adds some notes and ensures that the ImageCropperValueConverter shadows the correct one.

This commit is contained in:
Shannon
2016-02-04 16:26:39 +01:00
parent 0829bae5b2
commit fe0ed2ceea
3 changed files with 6 additions and 1 deletions

View File

@@ -164,6 +164,9 @@ namespace Umbraco.Core.Models.PublishedContent
private void InitializeConverters()
{
//TODO: Look at optimizing this method, it gets run for every property type for the document being rendered at startup,
// every precious second counts!
var converters = PropertyValueConvertersResolver.Current.Converters.ToArray();
var defaultConvertersWithAttributes = PropertyValueConvertersResolver.Current.DefaultConverters;

View File

@@ -8,6 +8,7 @@ namespace Umbraco.Core.PropertyEditors
/// <summary>
/// Manages the list of IPropertyEditorValueConverter's
/// </summary>
[Obsolete("IPropertyValueConverter is obsolete, but we need to support them until v8, to resolve the correct converter types use: PropertyValueConvertersResolver")]
internal sealed class PropertyEditorValueConvertersResolver : ManyObjectsResolverBase<PropertyEditorValueConvertersResolver, IPropertyEditorValueConverter>
{
/// <summary>

View File

@@ -6,6 +6,7 @@ using Newtonsoft.Json.Linq;
using Umbraco.Core.Dynamics;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.PropertyEditors.ValueConverters;
using Umbraco.Core.Services;
using Umbraco.Web.Models;
@@ -14,7 +15,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
/// <summary>
/// Used to strongly type the value for the image cropper
/// </summary>
[DefaultPropertyValueConverter(typeof (Core.PropertyEditors.ValueConverters.ImageCropperValueConverter))] //this shadows the Core.PropertyEditors.ValueConverters.ImageCropperValueConverter
[DefaultPropertyValueConverter(typeof (JsonValueConverter))] //this shadows the JsonValueConverter
[PropertyValueType(typeof (ImageCropDataSet))]
[PropertyValueCache(PropertyCacheValue.All, PropertyCacheLevel.Content)]
public class ImageCropperValueConverter : Core.PropertyEditors.ValueConverters.ImageCropperValueConverter