2017-05-12 14:49:44 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using AutoMapper;
|
|
|
|
|
|
using Umbraco.Core;
|
|
|
|
|
|
using Umbraco.Core.Models;
|
|
|
|
|
|
using Umbraco.Web.Models.ContentEditing;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.Models.Mapping
|
|
|
|
|
|
{
|
2017-07-19 13:42:47 +02:00
|
|
|
|
public class CodeFileProfile : Profile
|
2017-05-12 14:49:44 +02:00
|
|
|
|
{
|
2017-07-19 13:42:47 +02:00
|
|
|
|
public CodeFileProfile()
|
2017-05-12 14:49:44 +02:00
|
|
|
|
{
|
2017-07-19 13:42:47 +02:00
|
|
|
|
CreateMap<IPartialView, CodeFileDisplay>()
|
2017-05-12 14:49:44 +02:00
|
|
|
|
.ForMember(x => x.FileType, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Notifications, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Path, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Snippet, exp => exp.Ignore());
|
|
|
|
|
|
|
2017-07-19 13:42:47 +02:00
|
|
|
|
CreateMap<Script, CodeFileDisplay>()
|
2017-05-12 14:49:44 +02:00
|
|
|
|
.ForMember(x => x.FileType, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Notifications, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Path, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Snippet, exp => exp.Ignore());
|
|
|
|
|
|
|
2017-07-19 13:42:47 +02:00
|
|
|
|
CreateMap<CodeFileDisplay, IPartialView>()
|
2017-05-30 10:50:09 +02:00
|
|
|
|
.ForMember(x => x.DeletedDate, exp => exp.Ignore())
|
2017-05-12 14:49:44 +02:00
|
|
|
|
.ForMember(x => x.Id, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Key, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Path, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.CreateDate, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.UpdateDate, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Path, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Alias, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Name, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.OriginalPath, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.HasIdentity, exp => exp.Ignore());
|
|
|
|
|
|
|
2017-07-19 13:42:47 +02:00
|
|
|
|
CreateMap<CodeFileDisplay, Script>()
|
2017-05-30 10:50:09 +02:00
|
|
|
|
.ForMember(x => x.DeletedDate, exp => exp.Ignore())
|
2017-05-12 14:49:44 +02:00
|
|
|
|
.ForMember(x => x.Id, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Key, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Path, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.CreateDate, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.UpdateDate, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Path, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Alias, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.Name, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.OriginalPath, exp => exp.Ignore())
|
|
|
|
|
|
.ForMember(x => x.HasIdentity, exp => exp.Ignore());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|