Add WebCms
This commit is contained in:
@@ -6,20 +6,14 @@ namespace LeafWeb.Core.Remote
|
||||
{
|
||||
public class PiscalLeafInputFile
|
||||
{
|
||||
private static readonly IMapper Mapper;
|
||||
public string Filename { get; set; }
|
||||
public byte[] Contents { get; set; }
|
||||
|
||||
static PiscalLeafInputFile()
|
||||
{
|
||||
var config =
|
||||
new MapperConfiguration(cfg =>
|
||||
{
|
||||
cfg.CreateMap<LeafInputFile, PiscalLeafInputFile>()
|
||||
.ForMember(dest => dest.Filename, opt =>
|
||||
opt.MapFrom(src => src.Filename.WhitespaceToUnderscore().FilterValidFilename()));
|
||||
});
|
||||
Mapper = config.CreateMapper();
|
||||
Mapper.CreateMap<LeafInputFile, PiscalLeafInputFile>()
|
||||
.ForMember(dest => dest.Filename, opt =>
|
||||
opt.MapFrom(src => src.Filename.WhitespaceToUnderscore().FilterValidFilename()));
|
||||
}
|
||||
|
||||
public PiscalLeafInputFile() { }
|
||||
|
||||
Reference in New Issue
Block a user