v1.0.0
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Inspectron.Epson.PrintServer.Printers.Utils.InvoiceReceipt;
|
||||
|
||||
public class InvoiceReceiptConverter : IReceiptConverter
|
||||
{
|
||||
private readonly int _lineWidth;
|
||||
private readonly int _bigFontLineWidth;
|
||||
|
||||
public InvoiceReceiptConverter(int lineWidth, int bigFontLineWidth)
|
||||
{
|
||||
_lineWidth = lineWidth;
|
||||
_bigFontLineWidth = bigFontLineWidth;
|
||||
}
|
||||
|
||||
public List<PrintCommand> Convert(string jsonContent)
|
||||
{
|
||||
var receipt = JsonSerializer.Deserialize<InvoiceReceipt>(jsonContent);
|
||||
var converter = new ReceiptConverter(_lineWidth, _bigFontLineWidth);
|
||||
return converter.ConvertToPrintCommands(receipt);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user