diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/AssignedContentPermissions.cs b/src/Umbraco.Core/Models/ContentEditing/AssignedContentPermissions.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/AssignedContentPermissions.cs rename to src/Umbraco.Core/Models/ContentEditing/AssignedContentPermissions.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/AssignedUserGroupPermissions.cs b/src/Umbraco.Core/Models/ContentEditing/AssignedUserGroupPermissions.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/AssignedUserGroupPermissions.cs rename to src/Umbraco.Core/Models/ContentEditing/AssignedUserGroupPermissions.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeBasic.cs b/src/Umbraco.Core/Models/ContentEditing/ContentTypeBasic.cs similarity index 99% rename from src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeBasic.cs rename to src/Umbraco.Core/Models/ContentEditing/ContentTypeBasic.cs index 33749a451c..f9d633ebea 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeBasic.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentTypeBasic.cs @@ -5,7 +5,6 @@ using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; using Umbraco.Core; - namespace Umbraco.Web.Models.ContentEditing { /// diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeCompositionDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/ContentTypeCompositionDisplay.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeCompositionDisplay.cs rename to src/Umbraco.Core/Models/ContentEditing/ContentTypeCompositionDisplay.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeSave.cs b/src/Umbraco.Core/Models/ContentEditing/ContentTypeSave.cs similarity index 94% rename from src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeSave.cs rename to src/Umbraco.Core/Models/ContentEditing/ContentTypeSave.cs index a10fe3ded5..005e3c96a6 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentTypeSave.cs @@ -37,7 +37,7 @@ namespace Umbraco.Web.Models.ContentEditing public virtual IEnumerable Validate(ValidationContext validationContext) { if (CompositeContentTypes.Any(x => x.IsNullOrWhiteSpace())) - yield return new ValidationResult("Composite Content Type value cannot be null", new[] {"CompositeContentTypes"}); + yield return new ValidationResult("Composite Content Type value cannot be null", new[] { "CompositeContentTypes" }); } } @@ -89,7 +89,7 @@ namespace Umbraco.Web.Models.ContentEditing var lastIndex = Groups.IndexOf(duplicateGroups.Last().Last()); yield return new ValidationResult("Duplicate group names not allowed", new[] { - string.Format("Groups[{0}].Name", lastIndex) + $"Groups[{lastIndex}].Name" }); } @@ -102,10 +102,9 @@ namespace Umbraco.Web.Models.ContentEditing yield return new ValidationResult("Duplicate property aliases not allowed: " + lastProperty.Alias, new[] { - string.Format("Groups[{0}].Properties[{1}].Alias", propertyGroup.SortOrder, lastProperty.SortOrder) + $"Groups[{propertyGroup.SortOrder}].Properties[{lastProperty.SortOrder}].Alias" }); } - } } } diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeBasic.cs b/src/Umbraco.Core/Models/ContentEditing/DataTypeBasic.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeBasic.cs rename to src/Umbraco.Core/Models/ContentEditing/DataTypeBasic.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/DataTypeDisplay.cs similarity index 96% rename from src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeDisplay.cs rename to src/Umbraco.Core/Models/ContentEditing/DataTypeDisplay.cs index 9bead4bf5d..65ece0f6aa 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DataTypeDisplay.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; @@ -34,6 +33,5 @@ namespace Umbraco.Web.Models.ContentEditing /// [DataMember(Name = "notifications")] public List Notifications { get; private set; } - } } diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeReferences.cs b/src/Umbraco.Core/Models/ContentEditing/DataTypeReferences.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeReferences.cs rename to src/Umbraco.Core/Models/ContentEditing/DataTypeReferences.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeSave.cs b/src/Umbraco.Core/Models/ContentEditing/DataTypeSave.cs similarity index 99% rename from src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeSave.cs rename to src/Umbraco.Core/Models/ContentEditing/DataTypeSave.cs index db4acd4c4e..aa916c7566 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DataTypeSave.cs @@ -46,6 +46,5 @@ namespace Umbraco.Web.Models.ContentEditing /// [IgnoreDataMember] public IDataEditor PropertyEditor { get; set; } - } } diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/DictionaryDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/DictionaryDisplay.cs similarity index 90% rename from src/Umbraco.Infrastructure/Models/ContentEditing/DictionaryDisplay.cs rename to src/Umbraco.Core/Models/ContentEditing/DictionaryDisplay.cs index 9e0dee36f6..8b8f53c21a 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/DictionaryDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DictionaryDisplay.cs @@ -15,8 +15,8 @@ namespace Umbraco.Web.Models.ContentEditing /// public DictionaryDisplay() { - this.Notifications = new List(); - this.Translations = new List(); + Notifications = new List(); + Translations = new List(); } /// diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/DictionarySave.cs b/src/Umbraco.Core/Models/ContentEditing/DictionarySave.cs similarity index 91% rename from src/Umbraco.Infrastructure/Models/ContentEditing/DictionarySave.cs rename to src/Umbraco.Core/Models/ContentEditing/DictionarySave.cs index e54d1fab45..e99abd1f80 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/DictionarySave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DictionarySave.cs @@ -14,8 +14,8 @@ namespace Umbraco.Web.Models.ContentEditing /// Initializes a new instance of the class. /// public DictionarySave() - { - this.Translations = new List(); + { + Translations = new List(); } /// diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/DocumentTypeDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/DocumentTypeDisplay.cs similarity index 99% rename from src/Umbraco.Infrastructure/Models/ContentEditing/DocumentTypeDisplay.cs rename to src/Umbraco.Core/Models/ContentEditing/DocumentTypeDisplay.cs index 8aaa5c8af1..dd5818626a 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/DocumentTypeDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DocumentTypeDisplay.cs @@ -30,6 +30,5 @@ namespace Umbraco.Web.Models.ContentEditing [DataMember(Name = "apps")] public IEnumerable ContentApps { get; set; } - } } diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/DocumentTypeSave.cs b/src/Umbraco.Core/Models/ContentEditing/DocumentTypeSave.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/DocumentTypeSave.cs rename to src/Umbraco.Core/Models/ContentEditing/DocumentTypeSave.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/MacroDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/MacroDisplay.cs similarity index 93% rename from src/Umbraco.Infrastructure/Models/ContentEditing/MacroDisplay.cs rename to src/Umbraco.Core/Models/ContentEditing/MacroDisplay.cs index 33d2a959b6..55f0d5b89d 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/MacroDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MacroDisplay.cs @@ -14,8 +14,8 @@ namespace Umbraco.Web.Models.ContentEditing /// public MacroDisplay() { - this.Notifications = new List(); - this.Parameters = new List(); + Notifications = new List(); + Parameters = new List(); } /// diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/MediaTypeDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/MediaTypeDisplay.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/MediaTypeDisplay.cs rename to src/Umbraco.Core/Models/ContentEditing/MediaTypeDisplay.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/MediaTypeSave.cs b/src/Umbraco.Core/Models/ContentEditing/MediaTypeSave.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/MediaTypeSave.cs rename to src/Umbraco.Core/Models/ContentEditing/MediaTypeSave.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/MemberGroupDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/MemberGroupDisplay.cs similarity index 88% rename from src/Umbraco.Infrastructure/Models/ContentEditing/MemberGroupDisplay.cs rename to src/Umbraco.Core/Models/ContentEditing/MemberGroupDisplay.cs index 7706514711..55239700a4 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/MemberGroupDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MemberGroupDisplay.cs @@ -1,9 +1,8 @@ -using System.Runtime.Serialization; +using System.Collections.Generic; +using System.Runtime.Serialization; namespace Umbraco.Web.Models.ContentEditing { - using System.Collections.Generic; - [DataContract(Name = "memberGroup", Namespace = "")] public class MemberGroupDisplay : EntityBasic, INotificationModel { diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/MemberGroupSave.cs b/src/Umbraco.Core/Models/ContentEditing/MemberGroupSave.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/MemberGroupSave.cs rename to src/Umbraco.Core/Models/ContentEditing/MemberGroupSave.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/MemberTypeDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/MemberTypeDisplay.cs similarity index 99% rename from src/Umbraco.Infrastructure/Models/ContentEditing/MemberTypeDisplay.cs rename to src/Umbraco.Core/Models/ContentEditing/MemberTypeDisplay.cs index 26d06c5d1c..fdecbce57f 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/MemberTypeDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MemberTypeDisplay.cs @@ -5,6 +5,5 @@ namespace Umbraco.Web.Models.ContentEditing [DataContract(Name = "contentType", Namespace = "")] public class MemberTypeDisplay : ContentTypeCompositionDisplay { - } } diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/MemberTypeSave.cs b/src/Umbraco.Core/Models/ContentEditing/MemberTypeSave.cs similarity index 99% rename from src/Umbraco.Infrastructure/Models/ContentEditing/MemberTypeSave.cs rename to src/Umbraco.Core/Models/ContentEditing/MemberTypeSave.cs index be3d294714..b7def40e11 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/MemberTypeSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MemberTypeSave.cs @@ -5,6 +5,5 @@ /// public class MemberTypeSave : ContentTypeSave { - } } diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/RelationTypeDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/RelationTypeDisplay.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/RelationTypeDisplay.cs rename to src/Umbraco.Core/Models/ContentEditing/RelationTypeDisplay.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/RelationTypeSave.cs b/src/Umbraco.Core/Models/ContentEditing/RelationTypeSave.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/RelationTypeSave.cs rename to src/Umbraco.Core/Models/ContentEditing/RelationTypeSave.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/SearchResultEntity.cs b/src/Umbraco.Core/Models/ContentEditing/SearchResultEntity.cs similarity index 99% rename from src/Umbraco.Infrastructure/Models/ContentEditing/SearchResultEntity.cs rename to src/Umbraco.Core/Models/ContentEditing/SearchResultEntity.cs index a1cca9763d..45360d9464 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/SearchResultEntity.cs +++ b/src/Umbraco.Core/Models/ContentEditing/SearchResultEntity.cs @@ -10,6 +10,5 @@ namespace Umbraco.Web.Models.ContentEditing /// [DataMember(Name = "score")] public float Score { get; set; } - } } diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/TreeSearchResult.cs b/src/Umbraco.Core/Models/ContentEditing/TreeSearchResult.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/TreeSearchResult.cs rename to src/Umbraco.Core/Models/ContentEditing/TreeSearchResult.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/UserBasic.cs b/src/Umbraco.Core/Models/ContentEditing/UserBasic.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/UserBasic.cs rename to src/Umbraco.Core/Models/ContentEditing/UserBasic.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/UserDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/UserDisplay.cs similarity index 98% rename from src/Umbraco.Infrastructure/Models/ContentEditing/UserDisplay.cs rename to src/Umbraco.Core/Models/ContentEditing/UserDisplay.cs index 35317d8dd5..312095e1d1 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/UserDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UserDisplay.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Globalization; using System.Runtime.Serialization; namespace Umbraco.Web.Models.ContentEditing @@ -78,6 +77,5 @@ namespace Umbraco.Web.Models.ContentEditing [DataMember(Name = "updateDate")] [ReadOnly(true)] public DateTime UpdateDate { get; set; } - } } diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupBasic.cs b/src/Umbraco.Core/Models/ContentEditing/UserGroupBasic.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupBasic.cs rename to src/Umbraco.Core/Models/ContentEditing/UserGroupBasic.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/UserGroupDisplay.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupDisplay.cs rename to src/Umbraco.Core/Models/ContentEditing/UserGroupDisplay.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupSave.cs b/src/Umbraco.Core/Models/ContentEditing/UserGroupSave.cs similarity index 98% rename from src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupSave.cs rename to src/Umbraco.Core/Models/ContentEditing/UserGroupSave.cs index 4b76ec1bec..1b2bb710a2 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UserGroupSave.cs @@ -2,9 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; -using Newtonsoft.Json; using Umbraco.Core; -using Umbraco.Core.Models; using Umbraco.Core.Models.Membership; namespace Umbraco.Web.Models.ContentEditing @@ -74,7 +72,6 @@ namespace Umbraco.Web.Models.ContentEditing yield return new ValidationResult("A permission value cannot be null or empty", new[] { "AssignedPermissions" }); } } - } } } diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/UserInvite.cs b/src/Umbraco.Core/Models/ContentEditing/UserInvite.cs similarity index 100% rename from src/Umbraco.Infrastructure/Models/ContentEditing/UserInvite.cs rename to src/Umbraco.Core/Models/ContentEditing/UserInvite.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/UserSave.cs b/src/Umbraco.Core/Models/ContentEditing/UserSave.cs similarity index 98% rename from src/Umbraco.Infrastructure/Models/ContentEditing/UserSave.cs rename to src/Umbraco.Core/Models/ContentEditing/UserSave.cs index 6f9fea68d5..2533ebb105 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/UserSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UserSave.cs @@ -2,7 +2,6 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; -using Newtonsoft.Json; namespace Umbraco.Web.Models.ContentEditing { diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplay.cs index 89a71a0e2f..5840a4df19 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplay.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplay.cs @@ -1,5 +1,4 @@ -using Newtonsoft.Json; -using System; +using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; @@ -7,7 +6,6 @@ using System.Runtime.Serialization; using Umbraco.Core; using Umbraco.Core.Models; using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Serialization; using Umbraco.Web.Routing; namespace Umbraco.Web.Models.ContentEditing @@ -33,7 +31,6 @@ namespace Umbraco.Web.Models.ContentEditing [DataMember(Name = "udi")] [ReadOnly(true)] - [JsonConverter(typeof(UdiJsonConverter))] public Udi Udi { get; set; } [DataMember(Name = "icon")] @@ -151,7 +148,7 @@ namespace Umbraco.Web.Models.ContentEditing /// /// By default this is true but by using events developers can toggle this off for certain documents if there is nothing to preview /// - [DataMember( Name = "allowPreview" )] + [DataMember(Name = "allowPreview")] public bool AllowPreview { get; set; } /// diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplayBase.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplayBase.cs index e0beae7fce..98f898aeea 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplayBase.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplayBase.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; -using Umbraco.Core.Models; namespace Umbraco.Web.Models.ContentEditing { diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentVariationDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentVariationDisplay.cs index cb1834980e..47ede6ebce 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentVariationDisplay.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentVariationDisplay.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; using Newtonsoft.Json.Converters; @@ -38,7 +37,7 @@ namespace Umbraco.Web.Models.ContentEditing /// [IgnoreDataMember] [JsonIgnore] - IEnumerable IContentProperties.Properties => Tabs.SelectMany(x => x.Properties); + IEnumerable IContentProperties.Properties => Tabs.SelectMany(x => x.Properties); /// /// The language/culture assigned to this content variation diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/TabbedContentItem.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/TabbedContentItem.cs index 4c958656ef..db7d1df7bc 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/TabbedContentItem.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/TabbedContentItem.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using Newtonsoft.Json; -using Umbraco.Core.Models; namespace Umbraco.Web.Models.ContentEditing {