Add project files.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using Inspectron.Epson.PrintServer.PrintServices;
|
||||
|
||||
namespace Inspectron.Epson.PrintServer.ConfigurationSources;
|
||||
|
||||
public class EpsonPrintServiceConfiguration: IPrinterConfigurationSource, IAssignedPrinterRepository
|
||||
{
|
||||
public string GroupId { get; set; }
|
||||
public string RestaurantId { get; set; }
|
||||
|
||||
public Dictionary<string, PrinterConfiguration> PrinterConfigurations { get; set; }
|
||||
public PrinterConfiguration GetConfiguration(string printerAddress)
|
||||
{
|
||||
return PrinterConfigurations[printerAddress];
|
||||
}
|
||||
|
||||
public string? GetAssignedPrinter(string workAreaId)
|
||||
{
|
||||
return PrinterConfigurations.Values.Where(x => x.AreaId == workAreaId).Select(x=>x.Address).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user