diff --git a/src/Umbraco.Infrastructure/Compose/BlockEditorComponent.cs b/src/Umbraco.Infrastructure/Compose/BlockEditorComponent.cs index bee28b39ff..9b7fcc17d5 100644 --- a/src/Umbraco.Infrastructure/Compose/BlockEditorComponent.cs +++ b/src/Umbraco.Infrastructure/Compose/BlockEditorComponent.cs @@ -5,7 +5,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Umbraco.Cms.Core.Composing; using Umbraco.Cms.Core.Models.Blocks; -using Umbraco.Core.Models.Blocks; using Umbraco.Core.PropertyEditors; using Umbraco.Extensions; diff --git a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.MappingProfiles.cs b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.MappingProfiles.cs index 837055e6c1..b9a38fc161 100644 --- a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.MappingProfiles.cs +++ b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.MappingProfiles.cs @@ -4,7 +4,6 @@ using Umbraco.Cms.Core.Mapping; using Umbraco.Cms.Core.Models.Mapping; using Umbraco.Core.Security; using Umbraco.Extensions; -using Umbraco.Web.Models.Mapping; namespace Umbraco.Cms.Infrastructure.DependencyInjection { diff --git a/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs b/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs index ffac967a08..40c0b98474 100644 --- a/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs +++ b/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; namespace Umbraco.Cms.Core.Deploy { diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorData.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorData.cs index 14f5830417..164f554832 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorData.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorData.cs @@ -1,11 +1,9 @@ -using Newtonsoft.Json.Linq; -using System; +using System; using System.Collections.Generic; -using Umbraco.Cms.Core.Models.Blocks; +using Newtonsoft.Json.Linq; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { - /// /// Convertable block data from json /// diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorDataConverter.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorDataConverter.cs index a05b1b7803..838821b563 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorDataConverter.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorDataConverter.cs @@ -1,12 +1,10 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using System.Collections.Generic; using System.Linq; -using System.Collections.Generic; -using Umbraco.Cms.Core.Models.Blocks; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { - /// /// Converts the block json data into objects /// diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockItemData.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockItemData.cs index 693ce1ea8e..48ba7bc151 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockItemData.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockItemData.cs @@ -1,11 +1,9 @@ -using Newtonsoft.Json; -using System; +using System; using System.Collections.Generic; -using Umbraco.Cms.Core; -using Umbraco.Cms.Core.Models; +using Newtonsoft.Json; using Umbraco.Core.Serialization; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { /// /// Represents a single block's data in raw form diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockListEditorDataConverter.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockListEditorDataConverter.cs index 72e2c0b027..be8d1a47ac 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockListEditorDataConverter.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockListEditorDataConverter.cs @@ -1,9 +1,8 @@ -using Newtonsoft.Json.Linq; +using System.Collections.Generic; using System.Linq; -using System.Collections.Generic; -using Umbraco.Cms.Core.Models.Blocks; +using Newtonsoft.Json.Linq; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { /// /// Data converter for the block list property editor diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockListLayoutItem.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockListLayoutItem.cs index 18c880bd16..b551b87368 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockListLayoutItem.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockListLayoutItem.cs @@ -1,8 +1,7 @@ using Newtonsoft.Json; -using Umbraco.Cms.Core; using Umbraco.Core.Serialization; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { /// /// Used for deserializing the block list layout diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockValue.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockValue.cs index 4700ddfd3b..c6328bc0c3 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockValue.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockValue.cs @@ -1,8 +1,8 @@ -using Newtonsoft.Json; +using System.Collections.Generic; +using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using System.Collections.Generic; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { public class BlockValue { diff --git a/src/Umbraco.Infrastructure/Models/GridValue.cs b/src/Umbraco.Infrastructure/Models/GridValue.cs index 157304463f..b6caed78f4 100644 --- a/src/Umbraco.Infrastructure/Models/GridValue.cs +++ b/src/Umbraco.Infrastructure/Models/GridValue.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { // TODO: Make a property value converter for this! diff --git a/src/Umbraco.Infrastructure/Models/Mapping/EntityMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/EntityMapDefinition.cs index bf42ae3e7a..4bdd37d6b0 100644 --- a/src/Umbraco.Infrastructure/Models/Mapping/EntityMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/EntityMapDefinition.cs @@ -1,18 +1,14 @@ using System; using System.Collections.Generic; using Examine; -using Umbraco.Cms.Core; using Umbraco.Cms.Core.Mapping; -using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.ContentEditing; using Umbraco.Cms.Core.Models.Entities; -using Umbraco.Cms.Core.Models.Mapping; using Umbraco.Cms.Core.Models.Membership; using Umbraco.Cms.Infrastructure.Examine; using Umbraco.Extensions; -using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class EntityMapDefinition : IMapDefinition { diff --git a/src/Umbraco.Infrastructure/Models/PathValidationExtensions.cs b/src/Umbraco.Infrastructure/Models/PathValidationExtensions.cs index 966efda4b7..52a751d141 100644 --- a/src/Umbraco.Infrastructure/Models/PathValidationExtensions.cs +++ b/src/Umbraco.Infrastructure/Models/PathValidationExtensions.cs @@ -6,7 +6,7 @@ using Umbraco.Cms.Core.Models.Entities; using Umbraco.Core.Persistence.Dtos; using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Provides extension methods for path validation. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyEditor.cs index ba8d26cae2..06c4557d40 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyEditor.cs @@ -5,13 +5,12 @@ using System.Linq; using Microsoft.Extensions.Logging; using Newtonsoft.Json; using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Blocks; using Umbraco.Cms.Core.Models.Editors; using Umbraco.Cms.Core.PropertyEditors; using Umbraco.Cms.Core.Serialization; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Strings; -using Umbraco.Core.Models.Blocks; -using static Umbraco.Core.Models.Blocks.BlockItemData; using Umbraco.Extensions; namespace Umbraco.Web.PropertyEditors @@ -314,7 +313,7 @@ namespace Umbraco.Web.PropertyEditors if (!row.PropertyValues.ContainsKey(elementTypeProp.Alias)) { // set values to null - row.PropertyValues[elementTypeProp.Alias] = new BlockPropertyValue(null, elementTypeProp); + row.PropertyValues[elementTypeProp.Alias] = new BlockItemData.BlockPropertyValue(null, elementTypeProp); row.RawPropertyValues[elementTypeProp.Alias] = null; } } @@ -398,7 +397,7 @@ namespace Umbraco.Web.PropertyEditors if (!contentTypePropertyTypes.TryGetValue(contentType.Alias, out var propertyTypes)) propertyTypes = contentTypePropertyTypes[contentType.Alias] = contentType.CompositionPropertyTypes.ToDictionary(x => x.Alias, x => x); - var propValues = new Dictionary(); + var propValues = new Dictionary(); // find any keys that are not real property types and remove them foreach (var prop in block.RawPropertyValues.ToList()) @@ -413,7 +412,7 @@ namespace Umbraco.Web.PropertyEditors else { // set the value to include the resolved property type - propValues[prop.Key] = new BlockPropertyValue(prop.Value, propType); + propValues[prop.Key] = new BlockItemData.BlockPropertyValue(prop.Value, propType); } } diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockEditorConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockEditorConverter.cs index 9f025528e6..69625015c1 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockEditorConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockEditorConverter.cs @@ -1,14 +1,9 @@ -using Newtonsoft.Json.Linq; -using System; -using System.Collections.Generic; +using System; using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models.Blocks; using Umbraco.Cms.Core.Models.PublishedContent; using Umbraco.Cms.Core.PropertyEditors; using Umbraco.Cms.Core.PublishedCache; -using Umbraco.Core; -using Umbraco.Core.Models.Blocks; -using Umbraco.Core.PropertyEditors; -using Umbraco.Web.PublishedCache; namespace Umbraco.Web.PropertyEditors.ValueConverters { diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs index cf8bbb4fd6..46d57c127b 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs @@ -6,14 +6,12 @@ using Umbraco.Cms.Core.Logging; using Umbraco.Cms.Core.Models.Blocks; using Umbraco.Cms.Core.Models.PublishedContent; using Umbraco.Cms.Core.PropertyEditors; -using Umbraco.Core.Models.Blocks; using Umbraco.Core.PropertyEditors.ValueConverters; using Umbraco.Extensions; using Constants = Umbraco.Cms.Core.Constants; namespace Umbraco.Web.PropertyEditors.ValueConverters { - [DefaultPropertyValueConverter(typeof(JsonValueConverter))] public class BlockListPropertyValueConverter : PropertyValueConverterBase { diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PathValidationTests.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PathValidationTests.cs index 80efe1f286..bbe04db34a 100644 --- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PathValidationTests.cs +++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PathValidationTests.cs @@ -5,10 +5,10 @@ using System; using Microsoft.Extensions.Logging; using Moq; using NUnit.Framework; +using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.Entities; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Builders.Extensions; -using Umbraco.Core.Models; namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Models {