AB4549 - Moved mappers

This commit is contained in:
Bjarke Berg
2020-01-20 15:48:03 +01:00
parent e45ff0b63d
commit 3279098f02
13 changed files with 27 additions and 48 deletions
@@ -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)
{
@@ -10,7 +10,7 @@ namespace Umbraco.Web.Models.Mapping
/// Returns the <see cref="ContentSavedState?"/> for an <see cref="IContent"/> item
/// </summary>
/// <typeparam name="T"></typeparam>
internal class ContentBasicSavedStateMapper<T>
public class ContentBasicSavedStateMapper<T>
where T : ContentPropertyBasic
{
private readonly ContentSavedStateMapper<T> _inner = new ContentSavedStateMapper<T>();
@@ -25,7 +25,7 @@ namespace Umbraco.Web.Models.Mapping
/// Returns the <see cref="ContentSavedState"/> for an <see cref="IContent"/> item
/// </summary>
/// <typeparam name="T"></typeparam>
internal class ContentSavedStateMapper<T>
public class ContentSavedStateMapper<T>
where T : ContentPropertyBasic
{
public ContentSavedState Map(IContent source, MapperContext context)
@@ -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;
@@ -13,7 +13,7 @@ namespace Umbraco.Web.Models.Mapping
/// <summary>
/// The dictionary model mapper.
/// </summary>
internal class DictionaryMapDefinition : IMapDefinition
public class DictionaryMapDefinition : IMapDefinition
{
private readonly ILocalizationService _localizationService;
@@ -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)
{
@@ -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;
@@ -5,7 +5,7 @@ namespace Umbraco.Web.Models.Mapping
/// <summary>
/// Provides extension methods for the <see cref="MapperContext"/> class.
/// </summary>
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;
}
}
}
}
@@ -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;
@@ -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)
@@ -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)
{
@@ -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;
+14 -35
View File
@@ -193,7 +193,20 @@
<Compile Include="Models\Identity\IdentityUser.cs" />
<Compile Include="Models\Identity\UserLoginInfoWrapper.cs" />
<Compile Include="Models\Mapping\CommonMapper.cs" />
<Compile Include="Models\Mapping\MapperContextExtensions.cs" />
<Compile Include="Models\Mapping\ContentMapDefinition.cs" />
<Compile Include="Models\Mapping\ContentPropertyBasicMapper.cs" />
<Compile Include="Models\Mapping\ContentPropertyDisplayMapper.cs" />
<Compile Include="Models\Mapping\ContentPropertyDtoMapper.cs" />
<Compile Include="Models\Mapping\ContentPropertyMapDefinition.cs" />
<Compile Include="Models\Mapping\ContentTypeMapDefinition.cs" />
<Compile Include="Models\Mapping\EntityMapDefinition.cs" />
<Compile Include="Models\Mapping\MediaMapDefinition.cs" />
<Compile Include="Models\Mapping\MemberMapDefinition.cs" />
<Compile Include="Models\Mapping\MemberTabsAndPropertiesMapper.cs" />
<Compile Include="Models\Mapping\PropertyTypeGroupMapper.cs" />
<Compile Include="Models\Mapping\RedirectUrlMapDefinition.cs" />
<Compile Include="Models\Mapping\TabsAndPropertiesMapper.cs" />
<Compile Include="Models\Mapping\UserMapDefinition.cs" />
<Compile Include="Models\Membership\UmbracoMembershipMember.cs" />
<Compile Include="Models\PublishedContent\HybridVariationContextAccessor.cs" />
<Compile Include="Mvc\HttpUmbracoFormRouteStringException.cs" />
@@ -285,7 +298,6 @@
<Compile Include="ImageProcessorLogger.cs" />
<Compile Include="Macros\MacroTagParser.cs" />
<Compile Include="Trees\LogViewerTreeController.cs" />
<Compile Include="Models\Mapping\ContentSavedStateMapper.cs" />
<Compile Include="Mvc\ContainerControllerFactory.cs" />
<Compile Include="OwinExtensions.cs" />
<Compile Include="Security\BackOfficeCookieAuthenticationProvider.cs" />
@@ -387,14 +399,6 @@
<Compile Include="Editors\EditorModelEventManager.cs" />
<Compile Include="HtmlHelperBackOfficeExtensions.cs" />
<Compile Include="Models\ContentTypeImportModel.cs" />
<Compile Include="Models\Mapping\AuditMapDefinition.cs" />
<Compile Include="Models\Mapping\DictionaryMapDefinition.cs" />
<Compile Include="Models\Mapping\LanguageMapDefinition.cs" />
<Compile Include="Models\Mapping\CodeFileMapDefinition.cs" />
<Compile Include="Models\Mapping\MemberTabsAndPropertiesMapper.cs" />
<Compile Include="Models\Mapping\RedirectUrlMapDefinition.cs" />
<Compile Include="Models\Mapping\TemplateMapDefinition.cs" />
<Compile Include="Models\Mapping\ContentVariantMapper.cs" />
<Compile Include="Models\PublishedContent\HttpContextVariationContextAccessor.cs" />
<Compile Include="Models\PublishedContent\PublishedValueFallback.cs" />
<Compile Include="Models\Trees\ExportMember.cs" />
@@ -530,7 +534,6 @@
<Compile Include="Security\ForceRenewalCookieAuthenticationMiddleware.cs" />
<Compile Include="Security\GetUserSecondsMiddleWare.cs" />
<Compile Include="Security\IUmbracoBackOfficeTwoFactorOptions.cs" />
<Compile Include="Models\Mapping\PropertyTypeGroupMapper.cs" />
<Compile Include="Services\TreeService.cs" />
<Compile Include="Security\PreviewAuthenticationMiddleware.cs" />
<Compile Include="Trees\ContentTypeTreeController.cs" />
@@ -543,7 +546,6 @@
<Compile Include="IUmbracoContextAccessor.cs" />
<Compile Include="HtmlStringUtilities.cs" />
<Compile Include="IUmbracoComponentRenderer.cs" />
<Compile Include="Models\Mapping\RelationMapDefinition.cs" />
<Compile Include="Mvc\MvcVersionCheck.cs" />
<Compile Include="Scheduling\ThreadingTaskImmutable.cs" />
<Compile Include="Mvc\ProfilingView.cs" />
@@ -629,25 +631,12 @@
<Compile Include="Editors\UpdateCheckController.cs" />
<Compile Include="PasswordConfigurationExtensions.cs" />
<Compile Include="Editors\StylesheetController.cs" />
<Compile Include="Models\Mapping\MacroMapDefinition.cs" />
<Compile Include="Models\Mapping\MemberMapDefinition.cs" />
<Compile Include="Models\Mapping\TagMapDefinition.cs" />
<Compile Include="PropertyEditors\MemberGroupPickerPropertyEditor.cs" />
<Compile Include="PropertyEditors\ParameterEditors\ContentTypeParameterEditor.cs" />
<Compile Include="PropertyEditors\ParameterEditors\MultipleContentTypeParameterEditor.cs" />
<Compile Include="PropertyEditors\ParameterEditors\MultiplePropertyGroupParameterEditor.cs" />
<Compile Include="PropertyEditors\ParameterEditors\MultiplePropertyTypeParameterEditor.cs" />
<Compile Include="PropertyEditors\ParameterEditors\PropertyGroupParameterEditor.cs" />
<Compile Include="PropertyEditors\ParameterEditors\PropertyTypeParameterEditor.cs" />
<Compile Include="Models\UpgradeCheckResponse.cs" />
<Compile Include="Models\PasswordChangedModel.cs" />
<Compile Include="PropertyEditors\PropertyEditorAssetAttribute.cs" />
<Compile Include="PropertyEditors\RteEmbedController.cs" />
<Compile Include="Editors\EntityController.cs" />
<Compile Include="Editors\MemberController.cs" />
<Compile Include="Editors\CurrentUserController.cs" />
<Compile Include="Models\Mapping\DataTypeMapDefinition.cs" />
<Compile Include="Models\Mapping\EntityMapDefinition.cs" />
<Compile Include="PropertyEditors\RichTextPreValueController.cs" />
<Compile Include="PublishedContentQuery.cs" />
<Compile Include="ImageCropperTemplateExtensions.cs" />
@@ -719,16 +708,6 @@
<Compile Include="Editors\UmbracoAuthorizedJsonController.cs" />
<Compile Include="HttpCookieExtensions.cs" />
<Compile Include="FormDataCollectionExtensions.cs" />
<Compile Include="Models\Mapping\ContentPropertyBasicMapper.cs" />
<Compile Include="Models\Mapping\ContentPropertyDisplayMapper.cs" />
<Compile Include="Models\Mapping\ContentPropertyDtoMapper.cs" />
<Compile Include="Models\Mapping\ContentPropertyMapDefinition.cs" />
<Compile Include="Models\Mapping\MediaMapDefinition.cs" />
<Compile Include="Models\Mapping\ContentTypeMapDefinition.cs" />
<Compile Include="Models\Mapping\ContentMapDefinition.cs" />
<Compile Include="Models\Mapping\SectionMapDefinition.cs" />
<Compile Include="Models\Mapping\TabsAndPropertiesMapper.cs" />
<Compile Include="Models\Mapping\UserMapDefinition.cs" />
<Compile Include="PropertyEditors\RichTextPropertyEditor.cs" />
<Compile Include="Trees\MediaTreeController.cs" />
<Compile Include="Models\Trees\ActionMenuItem.cs" />