diff --git a/src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs b/src/Umbraco.Abstractions/Models/ContentTypeBaseExtensions.cs similarity index 96% rename from src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs rename to src/Umbraco.Abstractions/Models/ContentTypeBaseExtensions.cs index 121fb7a5d1..35c7b8e164 100644 --- a/src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs +++ b/src/Umbraco.Abstractions/Models/ContentTypeBaseExtensions.cs @@ -27,7 +27,7 @@ namespace Umbraco.Core.Models /// /// /// - internal static bool WasPropertyTypeVariationChanged(this IContentTypeBase contentType) + public static bool WasPropertyTypeVariationChanged(this IContentTypeBase contentType) { return contentType.WasPropertyTypeVariationChanged(out var _); } diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedContentTypeFactory.cs b/src/Umbraco.Abstractions/Models/PublishedContent/IPublishedContentTypeFactory.cs similarity index 100% rename from src/Umbraco.Core/Models/PublishedContent/IPublishedContentTypeFactory.cs rename to src/Umbraco.Abstractions/Models/PublishedContent/IPublishedContentTypeFactory.cs diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs b/src/Umbraco.Abstractions/Models/PublishedContent/PublishedContentType.cs similarity index 100% rename from src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs rename to src/Umbraco.Abstractions/Models/PublishedContent/PublishedContentType.cs diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs b/src/Umbraco.Abstractions/Models/PublishedContent/PublishedPropertyType.cs similarity index 100% rename from src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs rename to src/Umbraco.Abstractions/Models/PublishedContent/PublishedPropertyType.cs diff --git a/src/Umbraco.Core/PropertyEditors/ColorPickerConfiguration.cs b/src/Umbraco.Abstractions/PropertyEditors/ColorPickerConfiguration.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/ColorPickerConfiguration.cs rename to src/Umbraco.Abstractions/PropertyEditors/ColorPickerConfiguration.cs diff --git a/src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs b/src/Umbraco.Abstractions/PropertyEditors/DataEditorAttribute.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs rename to src/Umbraco.Abstractions/PropertyEditors/DataEditorAttribute.cs diff --git a/src/Umbraco.Core/PropertyEditors/DataEditorCollection.cs b/src/Umbraco.Abstractions/PropertyEditors/DataEditorCollection.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/DataEditorCollection.cs rename to src/Umbraco.Abstractions/PropertyEditors/DataEditorCollection.cs diff --git a/src/Umbraco.Core/PropertyEditors/DataEditorCollectionBuilder.cs b/src/Umbraco.Abstractions/PropertyEditors/DataEditorCollectionBuilder.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/DataEditorCollectionBuilder.cs rename to src/Umbraco.Abstractions/PropertyEditors/DataEditorCollectionBuilder.cs diff --git a/src/Umbraco.Core/PropertyEditors/DateTimeConfiguration.cs b/src/Umbraco.Abstractions/PropertyEditors/DateTimeConfiguration.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/DateTimeConfiguration.cs rename to src/Umbraco.Abstractions/PropertyEditors/DateTimeConfiguration.cs diff --git a/src/Umbraco.Core/PropertyEditors/DefaultPropertyIndexValueFactory.cs b/src/Umbraco.Abstractions/PropertyEditors/DefaultPropertyIndexValueFactory.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/DefaultPropertyIndexValueFactory.cs rename to src/Umbraco.Abstractions/PropertyEditors/DefaultPropertyIndexValueFactory.cs diff --git a/src/Umbraco.Core/PropertyEditors/DropDownFlexibleConfiguration.cs b/src/Umbraco.Abstractions/PropertyEditors/DropDownFlexibleConfiguration.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/DropDownFlexibleConfiguration.cs rename to src/Umbraco.Abstractions/PropertyEditors/DropDownFlexibleConfiguration.cs diff --git a/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs b/src/Umbraco.Abstractions/PropertyEditors/IPropertyValueConverter.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs rename to src/Umbraco.Abstractions/PropertyEditors/IPropertyValueConverter.cs diff --git a/src/Umbraco.Core/PropertyEditors/ImageCropperConfiguration.cs b/src/Umbraco.Abstractions/PropertyEditors/ImageCropperConfiguration.cs similarity index 74% rename from src/Umbraco.Core/PropertyEditors/ImageCropperConfiguration.cs rename to src/Umbraco.Abstractions/PropertyEditors/ImageCropperConfiguration.cs index 2ce6e2ec04..f291326dc5 100644 --- a/src/Umbraco.Core/PropertyEditors/ImageCropperConfiguration.cs +++ b/src/Umbraco.Abstractions/PropertyEditors/ImageCropperConfiguration.cs @@ -1,4 +1,4 @@ -using Newtonsoft.Json; +using System.Runtime.Serialization; namespace Umbraco.Core.PropertyEditors { @@ -10,15 +10,16 @@ namespace Umbraco.Core.PropertyEditors [ConfigurationField("crops", "Define crops", "views/propertyeditors/imagecropper/imagecropper.prevalues.html")] public Crop[] Crops { get; set; } + [DataContract] public class Crop { - [JsonProperty("alias")] + [DataMember(Name = "alias")] public string Alias { get; set; } - [JsonProperty("width")] + [DataMember(Name = "width")] public int Width { get; set; } - [JsonProperty("height")] + [DataMember(Name = "height")] public int Height { get; set; } } } diff --git a/src/Umbraco.Core/PropertyEditors/LabelConfiguration.cs b/src/Umbraco.Abstractions/PropertyEditors/LabelConfiguration.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/LabelConfiguration.cs rename to src/Umbraco.Abstractions/PropertyEditors/LabelConfiguration.cs diff --git a/src/Umbraco.Core/PropertyEditors/ParameterEditorCollection.cs b/src/Umbraco.Abstractions/PropertyEditors/ParameterEditorCollection.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/ParameterEditorCollection.cs rename to src/Umbraco.Abstractions/PropertyEditors/ParameterEditorCollection.cs diff --git a/src/Umbraco.Core/PropertyEditors/PropertyEditorCollection.cs b/src/Umbraco.Abstractions/PropertyEditors/PropertyEditorCollection.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/PropertyEditorCollection.cs rename to src/Umbraco.Abstractions/PropertyEditors/PropertyEditorCollection.cs diff --git a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs b/src/Umbraco.Abstractions/PropertyEditors/PropertyValueConverterBase.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs rename to src/Umbraco.Abstractions/PropertyEditors/PropertyValueConverterBase.cs diff --git a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterCollection.cs b/src/Umbraco.Abstractions/PropertyEditors/PropertyValueConverterCollection.cs similarity index 98% rename from src/Umbraco.Core/PropertyEditors/PropertyValueConverterCollection.cs rename to src/Umbraco.Abstractions/PropertyEditors/PropertyValueConverterCollection.cs index e351309e4a..a5e91562dc 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterCollection.cs +++ b/src/Umbraco.Abstractions/PropertyEditors/PropertyValueConverterCollection.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; using Umbraco.Core.Composing; namespace Umbraco.Core.PropertyEditors diff --git a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterCollectionBuilder.cs b/src/Umbraco.Abstractions/PropertyEditors/PropertyValueConverterCollectionBuilder.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/PropertyValueConverterCollectionBuilder.cs rename to src/Umbraco.Abstractions/PropertyEditors/PropertyValueConverterCollectionBuilder.cs diff --git a/src/Umbraco.Core/PropertyEditors/SliderConfiguration.cs b/src/Umbraco.Abstractions/PropertyEditors/SliderConfiguration.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/SliderConfiguration.cs rename to src/Umbraco.Abstractions/PropertyEditors/SliderConfiguration.cs diff --git a/src/Umbraco.Core/PropertyEditors/TagConfiguration.cs b/src/Umbraco.Abstractions/PropertyEditors/TagConfiguration.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/TagConfiguration.cs rename to src/Umbraco.Abstractions/PropertyEditors/TagConfiguration.cs diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs b/src/Umbraco.Abstractions/PropertyEditors/ValueConverters/DatePickerValueConverter.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs rename to src/Umbraco.Abstractions/PropertyEditors/ValueConverters/DatePickerValueConverter.cs diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/DecimalValueConverter.cs b/src/Umbraco.Abstractions/PropertyEditors/ValueConverters/DecimalValueConverter.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/ValueConverters/DecimalValueConverter.cs rename to src/Umbraco.Abstractions/PropertyEditors/ValueConverters/DecimalValueConverter.cs diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/EmailAddressValueConverter.cs b/src/Umbraco.Abstractions/PropertyEditors/ValueConverters/EmailAddressValueConverter.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/ValueConverters/EmailAddressValueConverter.cs rename to src/Umbraco.Abstractions/PropertyEditors/ValueConverters/EmailAddressValueConverter.cs diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/IntegerValueConverter.cs b/src/Umbraco.Abstractions/PropertyEditors/ValueConverters/IntegerValueConverter.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/ValueConverters/IntegerValueConverter.cs rename to src/Umbraco.Abstractions/PropertyEditors/ValueConverters/IntegerValueConverter.cs diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/MemberGroupPickerValueConverter.cs b/src/Umbraco.Abstractions/PropertyEditors/ValueConverters/MemberGroupPickerValueConverter.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/ValueConverters/MemberGroupPickerValueConverter.cs rename to src/Umbraco.Abstractions/PropertyEditors/ValueConverters/MemberGroupPickerValueConverter.cs diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs b/src/Umbraco.Abstractions/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs rename to src/Umbraco.Abstractions/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/MustBeStringValueConverter.cs b/src/Umbraco.Abstractions/PropertyEditors/ValueConverters/MustBeStringValueConverter.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/ValueConverters/MustBeStringValueConverter.cs rename to src/Umbraco.Abstractions/PropertyEditors/ValueConverters/MustBeStringValueConverter.cs diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/RadioButtonListValueConverter.cs b/src/Umbraco.Abstractions/PropertyEditors/ValueConverters/RadioButtonListValueConverter.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/ValueConverters/RadioButtonListValueConverter.cs rename to src/Umbraco.Abstractions/PropertyEditors/ValueConverters/RadioButtonListValueConverter.cs diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/TextStringValueConverter.cs b/src/Umbraco.Abstractions/PropertyEditors/ValueConverters/TextStringValueConverter.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/ValueConverters/TextStringValueConverter.cs rename to src/Umbraco.Abstractions/PropertyEditors/ValueConverters/TextStringValueConverter.cs diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/UploadPropertyConverter.cs b/src/Umbraco.Abstractions/PropertyEditors/ValueConverters/UploadPropertyConverter.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/ValueConverters/UploadPropertyConverter.cs rename to src/Umbraco.Abstractions/PropertyEditors/ValueConverters/UploadPropertyConverter.cs diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs b/src/Umbraco.Abstractions/PropertyEditors/ValueConverters/YesNoValueConverter.cs similarity index 100% rename from src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs rename to src/Umbraco.Abstractions/PropertyEditors/ValueConverters/YesNoValueConverter.cs diff --git a/src/Umbraco.Core/PropertyEditors/ValueListConfiguration.cs b/src/Umbraco.Abstractions/PropertyEditors/ValueListConfiguration.cs similarity index 80% rename from src/Umbraco.Core/PropertyEditors/ValueListConfiguration.cs rename to src/Umbraco.Abstractions/PropertyEditors/ValueListConfiguration.cs index c5b8b723bd..d5195ab54a 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueListConfiguration.cs +++ b/src/Umbraco.Abstractions/PropertyEditors/ValueListConfiguration.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Newtonsoft.Json; +using System.Runtime.Serialization; namespace Umbraco.Core.PropertyEditors { @@ -11,12 +11,13 @@ namespace Umbraco.Core.PropertyEditors [ConfigurationField("items", "Configure", "multivalues", Description = "Add, remove or sort values for the list.")] public List Items { get; set; } = new List(); + [DataContract] public class ValueListItem { - [JsonProperty("id")] + [DataMember(Name = "id")] public int Id { get; set; } - [JsonProperty("value")] + [DataMember(Name = "value")] public string Value { get; set; } } } diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index b02a7df78c..7bff31c5ae 100755 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -212,8 +212,6 @@ - - @@ -221,17 +219,25 @@ + + + + + + + + + + + + - - - - @@ -315,7 +321,6 @@ - @@ -349,23 +354,11 @@ - - - - - - - - - - - - @@ -455,7 +448,6 @@ - @@ -801,34 +793,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -