Piscal client - check status and retrieve file skeleton in place
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user