2020-12-04 02:21:21 +11:00
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2021-02-18 11:06:02 +01:00
|
|
|
using Umbraco.Cms.Core.DependencyInjection;
|
|
|
|
|
using Umbraco.Cms.Core.Mapping;
|
|
|
|
|
using Umbraco.Cms.Web.BackOffice.Mapping;
|
2020-06-09 07:49:26 +02:00
|
|
|
|
2022-06-20 08:37:17 +02:00
|
|
|
namespace Umbraco.Extensions;
|
|
|
|
|
|
|
|
|
|
public static class WebMappingProfiles
|
2020-06-09 07:49:26 +02:00
|
|
|
{
|
2022-06-20 08:37:17 +02:00
|
|
|
public static IUmbracoBuilder AddWebMappingProfiles(this IUmbracoBuilder builder)
|
2020-06-09 07:49:26 +02:00
|
|
|
{
|
2022-06-20 08:37:17 +02:00
|
|
|
builder.WithCollectionBuilder<MapDefinitionCollectionBuilder>()
|
|
|
|
|
.Add<ContentMapDefinition>()
|
|
|
|
|
.Add<MediaMapDefinition>()
|
|
|
|
|
.Add<MemberMapDefinition>();
|
2020-06-09 07:49:26 +02:00
|
|
|
|
2022-06-20 08:37:17 +02:00
|
|
|
builder.Services.AddTransient<CommonTreeNodeMapper>();
|
2020-06-09 07:49:26 +02:00
|
|
|
|
2022-06-20 08:37:17 +02:00
|
|
|
return builder;
|
2020-06-09 07:49:26 +02:00
|
|
|
}
|
|
|
|
|
}
|