Add WebCms

This commit is contained in:
2016-11-07 12:56:17 -05:00
parent dfe92218f4
commit 15911f33c0
2750 changed files with 365672 additions and 133 deletions
+9 -14
View File
@@ -7,7 +7,6 @@ namespace LeafWeb.Core.Remote
{
public class PiscalLeafInput
{
private static readonly IMapper Mapper;
public int LeafInputId { get; set; }
public string PhotosyntheticType { get; set; }
public string PiscalDirectoryName { get; set; }
@@ -17,19 +16,15 @@ namespace LeafWeb.Core.Remote
static PiscalLeafInput()
{
var config =
new MapperConfiguration(cfg =>
{
cfg.CreateMap<LeafInput, PiscalLeafInput>()
.ForMember(dest => dest.PiscalDirectoryName,
opt => opt.MapFrom(src => PiscalUtility.GetPiscalDirectoryName(src)))
.ForMember(dest => dest.LeafInputId, opt => opt.MapFrom(src => src.Id))
.ForMember(dest => dest.InputFiles, opt => opt.MapFrom(src => src.InputFiles.Select(f => new PiscalLeafInputFile(f)).ToArray()))
.ForMember(
dest => dest.PhotosyntheticType,
opt => opt.MapFrom(src => src.PhotosynthesisType.Id.WhitespaceToUnderscore()));
});
Mapper = config.CreateMapper();
Mapper.CreateMap<LeafInput, PiscalLeafInput>()
.ForMember(dest => dest.PiscalDirectoryName,
opt => opt.MapFrom(src => PiscalUtility.GetPiscalDirectoryName(src)))
.ForMember(dest => dest.LeafInputId, opt => opt.MapFrom(src => src.Id))
.ForMember(dest => dest.InputFiles, opt => opt.MapFrom(src => src.InputFiles.Select(f => new PiscalLeafInputFile(f)).ToArray()))
.ForMember(
dest => dest.PhotosyntheticType,
opt => opt.MapFrom(src => src.PhotosynthesisType.Id.WhitespaceToUnderscore()));
}
public PiscalLeafInput() { }