From 3279098f024b9a8f904e1d7472be162bc2a9769f Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 20 Jan 2020 15:48:03 +0100 Subject: [PATCH] AB4549 - Moved mappers --- .../Models/Mapping/AuditMapDefinition.cs | 2 +- .../Models/Mapping/CodeFileMapDefinition.cs | 0 .../Models/Mapping/ContentSavedStateMapper.cs | 4 +- .../Models/Mapping/ContentVariantMapper.cs | 2 +- .../Models/Mapping/DictionaryMapDefinition.cs | 2 +- .../Models/Mapping/LanguageMapDefinition.cs | 2 +- .../Models/Mapping/MacroMapDefinition.cs | 2 +- .../Models/Mapping/MapperContextExtensions.cs | 4 +- .../Models/Mapping/RelationMapDefinition.cs | 2 +- .../Models/Mapping/SectionMapDefinition.cs | 2 +- .../Models/Mapping/TagMapDefinition.cs | 2 +- .../Models/Mapping/TemplateMapDefinition.cs | 2 +- src/Umbraco.Web/Umbraco.Web.csproj | 49 ++++++------------- 13 files changed, 27 insertions(+), 48 deletions(-) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/AuditMapDefinition.cs (93%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/CodeFileMapDefinition.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/ContentSavedStateMapper.cs (96%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/ContentVariantMapper.cs (98%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/DictionaryMapDefinition.cs (98%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/LanguageMapDefinition.cs (97%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/MacroMapDefinition.cs (98%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/MapperContextExtensions.cs (96%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/RelationMapDefinition.cs (98%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/SectionMapDefinition.cs (96%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/TagMapDefinition.cs (91%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/TemplateMapDefinition.cs (97%) diff --git a/src/Umbraco.Web/Models/Mapping/AuditMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/AuditMapDefinition.cs similarity index 93% rename from src/Umbraco.Web/Models/Mapping/AuditMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/AuditMapDefinition.cs index 9bc0229550..51a0fed704 100644 --- a/src/Umbraco.Web/Models/Mapping/AuditMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/AuditMapDefinition.cs @@ -4,7 +4,7 @@ using Umbraco.Web.Models.ContentEditing; namespace Umbraco.Web.Models.Mapping { - internal class AuditMapDefinition : IMapDefinition + public class AuditMapDefinition : IMapDefinition { public void DefineMaps(UmbracoMapper mapper) { diff --git a/src/Umbraco.Web/Models/Mapping/CodeFileMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/CodeFileMapDefinition.cs similarity index 100% rename from src/Umbraco.Web/Models/Mapping/CodeFileMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/CodeFileMapDefinition.cs diff --git a/src/Umbraco.Web/Models/Mapping/ContentSavedStateMapper.cs b/src/Umbraco.Infrastructure/Models/Mapping/ContentSavedStateMapper.cs similarity index 96% rename from src/Umbraco.Web/Models/Mapping/ContentSavedStateMapper.cs rename to src/Umbraco.Infrastructure/Models/Mapping/ContentSavedStateMapper.cs index dfb334621d..82f1d4e9bb 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentSavedStateMapper.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/ContentSavedStateMapper.cs @@ -10,7 +10,7 @@ namespace Umbraco.Web.Models.Mapping /// Returns the for an item /// /// - internal class ContentBasicSavedStateMapper + public class ContentBasicSavedStateMapper where T : ContentPropertyBasic { private readonly ContentSavedStateMapper _inner = new ContentSavedStateMapper(); @@ -25,7 +25,7 @@ namespace Umbraco.Web.Models.Mapping /// Returns the for an item /// /// - internal class ContentSavedStateMapper + public class ContentSavedStateMapper where T : ContentPropertyBasic { public ContentSavedState Map(IContent source, MapperContext context) diff --git a/src/Umbraco.Web/Models/Mapping/ContentVariantMapper.cs b/src/Umbraco.Infrastructure/Models/Mapping/ContentVariantMapper.cs similarity index 98% rename from src/Umbraco.Web/Models/Mapping/ContentVariantMapper.cs rename to src/Umbraco.Infrastructure/Models/Mapping/ContentVariantMapper.cs index c279ae2c70..1a911f6d1e 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentVariantMapper.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/ContentVariantMapper.cs @@ -10,7 +10,7 @@ using Language = Umbraco.Web.Models.ContentEditing.Language; namespace Umbraco.Web.Models.Mapping { - internal class ContentVariantMapper + public class ContentVariantMapper { private readonly ILocalizationService _localizationService; diff --git a/src/Umbraco.Web/Models/Mapping/DictionaryMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/DictionaryMapDefinition.cs similarity index 98% rename from src/Umbraco.Web/Models/Mapping/DictionaryMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/DictionaryMapDefinition.cs index c7ae0cb717..278adc56e0 100644 --- a/src/Umbraco.Web/Models/Mapping/DictionaryMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/DictionaryMapDefinition.cs @@ -13,7 +13,7 @@ namespace Umbraco.Web.Models.Mapping /// /// The dictionary model mapper. /// - internal class DictionaryMapDefinition : IMapDefinition + public class DictionaryMapDefinition : IMapDefinition { private readonly ILocalizationService _localizationService; diff --git a/src/Umbraco.Web/Models/Mapping/LanguageMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/LanguageMapDefinition.cs similarity index 97% rename from src/Umbraco.Web/Models/Mapping/LanguageMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/LanguageMapDefinition.cs index 28074d4817..6fcbe1a88b 100644 --- a/src/Umbraco.Web/Models/Mapping/LanguageMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/LanguageMapDefinition.cs @@ -8,7 +8,7 @@ using Language = Umbraco.Web.Models.ContentEditing.Language; namespace Umbraco.Web.Models.Mapping { - internal class LanguageMapDefinition : IMapDefinition + public class LanguageMapDefinition : IMapDefinition { public void DefineMaps(UmbracoMapper mapper) { diff --git a/src/Umbraco.Web/Models/Mapping/MacroMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/MacroMapDefinition.cs similarity index 98% rename from src/Umbraco.Web/Models/Mapping/MacroMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/MacroMapDefinition.cs index e5bca22287..7138c5d795 100644 --- a/src/Umbraco.Web/Models/Mapping/MacroMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/MacroMapDefinition.cs @@ -9,7 +9,7 @@ using Umbraco.Web.Models.ContentEditing; namespace Umbraco.Web.Models.Mapping { - internal class MacroMapDefinition : IMapDefinition + public class MacroMapDefinition : IMapDefinition { private readonly ParameterEditorCollection _parameterEditors; private readonly ILogger _logger; diff --git a/src/Umbraco.Web/Models/Mapping/MapperContextExtensions.cs b/src/Umbraco.Infrastructure/Models/Mapping/MapperContextExtensions.cs similarity index 96% rename from src/Umbraco.Web/Models/Mapping/MapperContextExtensions.cs rename to src/Umbraco.Infrastructure/Models/Mapping/MapperContextExtensions.cs index 1538f1a987..020a66cd2a 100644 --- a/src/Umbraco.Web/Models/Mapping/MapperContextExtensions.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/MapperContextExtensions.cs @@ -5,7 +5,7 @@ namespace Umbraco.Web.Models.Mapping /// /// Provides extension methods for the class. /// - internal static class MapperContextExtensions + public static class MapperContextExtensions { private const string CultureKey = "Map.Culture"; private const string IncludedPropertiesKey = "Map.IncludedProperties"; @@ -42,4 +42,4 @@ namespace Umbraco.Web.Models.Mapping context.Items[IncludedPropertiesKey] = properties; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/Models/Mapping/RelationMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/RelationMapDefinition.cs similarity index 98% rename from src/Umbraco.Web/Models/Mapping/RelationMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/RelationMapDefinition.cs index d26a867858..d6ec4fd969 100644 --- a/src/Umbraco.Web/Models/Mapping/RelationMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/RelationMapDefinition.cs @@ -7,7 +7,7 @@ using Umbraco.Web.Models.ContentEditing; namespace Umbraco.Web.Models.Mapping { - internal class RelationMapDefinition : IMapDefinition + public class RelationMapDefinition : IMapDefinition { private readonly IEntityService _entityService; private readonly IRelationService _relationService; diff --git a/src/Umbraco.Web/Models/Mapping/SectionMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/SectionMapDefinition.cs similarity index 96% rename from src/Umbraco.Web/Models/Mapping/SectionMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/SectionMapDefinition.cs index e05e6e5c84..20b1d2e05f 100644 --- a/src/Umbraco.Web/Models/Mapping/SectionMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/SectionMapDefinition.cs @@ -7,7 +7,7 @@ using Umbraco.Web.Sections; namespace Umbraco.Web.Models.Mapping { - internal class SectionMapDefinition : IMapDefinition + public class SectionMapDefinition : IMapDefinition { private readonly ILocalizedTextService _textService; public SectionMapDefinition(ILocalizedTextService textService) diff --git a/src/Umbraco.Web/Models/Mapping/TagMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/TagMapDefinition.cs similarity index 91% rename from src/Umbraco.Web/Models/Mapping/TagMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/TagMapDefinition.cs index 2161183504..32912489c2 100644 --- a/src/Umbraco.Web/Models/Mapping/TagMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/TagMapDefinition.cs @@ -3,7 +3,7 @@ using Umbraco.Core.Models; namespace Umbraco.Web.Models.Mapping { - internal class TagMapDefinition : IMapDefinition + public class TagMapDefinition : IMapDefinition { public void DefineMaps(UmbracoMapper mapper) { diff --git a/src/Umbraco.Web/Models/Mapping/TemplateMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/TemplateMapDefinition.cs similarity index 97% rename from src/Umbraco.Web/Models/Mapping/TemplateMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/TemplateMapDefinition.cs index 6868040586..99b69c1fb3 100644 --- a/src/Umbraco.Web/Models/Mapping/TemplateMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/TemplateMapDefinition.cs @@ -5,7 +5,7 @@ using Umbraco.Web.Models.ContentEditing; namespace Umbraco.Web.Models.Mapping { - internal class TemplateMapDefinition : IMapDefinition + public class TemplateMapDefinition : IMapDefinition { private readonly IShortStringHelper _shortStringHelper; diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 3d1de77746..ae1c196a21 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -193,7 +193,20 @@ - + + + + + + + + + + + + + + @@ -285,7 +298,6 @@ - @@ -387,14 +399,6 @@ - - - - - - - - @@ -530,7 +534,6 @@ - @@ -543,7 +546,6 @@ - @@ -629,25 +631,12 @@ - - - - - - - - - - - - - @@ -719,16 +708,6 @@ - - - - - - - - - -