Files
LeafWeb/Core/Remote/PiscalLeafInputFile.cs
2016-11-07 12:56:17 -05:00

27 lines
600 B
C#

using AutoMapper;
using LeafWeb.Core.Entities;
using LeafWeb.Core.Utility;
namespace LeafWeb.Core.Remote
{
public class PiscalLeafInputFile
{
public string Filename { get; set; }
public byte[] Contents { get; set; }
static PiscalLeafInputFile()
{
Mapper.CreateMap<LeafInputFile, PiscalLeafInputFile>()
.ForMember(dest => dest.Filename, opt =>
opt.MapFrom(src => src.Filename.WhitespaceToUnderscore().FilterValidFilename()));
}
public PiscalLeafInputFile() { }
public PiscalLeafInputFile(LeafInputFile leafInputFile)
{
Mapper.Map(leafInputFile, this);
}
}
}