Piscal client - check status and retrieve file skeleton in place

This commit is contained in:
2016-02-19 11:45:16 -05:00
parent 6534fc142b
commit 75fa448a0f
13 changed files with 345 additions and 107 deletions
+34
View File
@@ -0,0 +1,34 @@
using AutoMapper;
using LeafWeb.Core.Entities;
namespace LeafWeb.Core.Remote
{
public class PiscalLeafOutputFile
{
private static readonly IMapper Mapper;
public string Filename { get; set; }
public byte[] Contents { get; set; }
public string DirectoryName { get; set; }
public int LeafInputId => PiscalUtility.GetIdFromDirectoryName(DirectoryName);
static PiscalLeafOutputFile()
{
var config =
new MapperConfiguration(cfg =>
{
cfg.CreateMap<PiscalLeafOutputFile, LeafOutputFile>();
});
Mapper = config.CreateMapper();
}
public PiscalLeafOutputFile() { }
public LeafOutputFile GetLeafOutputFile()
{
var leafOutputFile = new LeafOutputFile();
Mapper.Map(this, leafOutputFile);
return leafOutputFile;
}
}
}