Added events.Service and xmlhelper.service

This commit is contained in:
perploug
2013-08-12 15:06:12 +02:00
committed by Per Ploug Krogslund
parent 3e3f12bf63
commit e825c08901
982 changed files with 162678 additions and 162678 deletions

View File

@@ -1,36 +1,36 @@
using AutoMapper;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Mapping;
using Umbraco.Web.Models.ContentEditing;
namespace Umbraco.Web.Models.Mapping
{
/// <summary>
/// A mapper which declares how to map content properties. These mappings are shared among media (and probably members) which is
/// why they are in their own mapper
/// </summary>
internal class ContentPropertyModelMapper : MapperConfiguration
{
public override void ConfigureMappings(IConfiguration config, ApplicationContext applicationContext)
{
//FROM Property TO ContentPropertyBasic
config.CreateMap<PropertyGroup, Tab<ContentPropertyDisplay>>()
.ForMember(tab => tab.Label, expression => expression.MapFrom(@group => @group.Name))
.ForMember(tab => tab.IsActive, expression => expression.UseValue(true))
.ForMember(tab => tab.Properties, expression => expression.Ignore());
//FROM Property TO ContentPropertyBasic
config.CreateMap<Property, ContentPropertyBasic>()
.ConvertUsing<ContentPropertyBasicConverter<ContentPropertyBasic>>();
//FROM Property TO ContentPropertyDto
config.CreateMap<Property, ContentPropertyDto>()
.ConvertUsing(new ContentPropertyDtoConverter(applicationContext));
//FROM Property TO ContentPropertyDisplay
config.CreateMap<Property, ContentPropertyDisplay>()
.ConvertUsing(new ContentPropertyDisplayConverter(applicationContext));
}
}
using AutoMapper;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Mapping;
using Umbraco.Web.Models.ContentEditing;
namespace Umbraco.Web.Models.Mapping
{
/// <summary>
/// A mapper which declares how to map content properties. These mappings are shared among media (and probably members) which is
/// why they are in their own mapper
/// </summary>
internal class ContentPropertyModelMapper : MapperConfiguration
{
public override void ConfigureMappings(IConfiguration config, ApplicationContext applicationContext)
{
//FROM Property TO ContentPropertyBasic
config.CreateMap<PropertyGroup, Tab<ContentPropertyDisplay>>()
.ForMember(tab => tab.Label, expression => expression.MapFrom(@group => @group.Name))
.ForMember(tab => tab.IsActive, expression => expression.UseValue(true))
.ForMember(tab => tab.Properties, expression => expression.Ignore());
//FROM Property TO ContentPropertyBasic
config.CreateMap<Property, ContentPropertyBasic>()
.ConvertUsing<ContentPropertyBasicConverter<ContentPropertyBasic>>();
//FROM Property TO ContentPropertyDto
config.CreateMap<Property, ContentPropertyDto>()
.ConvertUsing(new ContentPropertyDtoConverter(applicationContext));
//FROM Property TO ContentPropertyDisplay
config.CreateMap<Property, ContentPropertyDisplay>()
.ConvertUsing(new ContentPropertyDisplayConverter(applicationContext));
}
}
}