templates support
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
namespace Inspectron.Epson.Templates.Configuration;
|
||||
|
||||
public record TemplateAssignment(
|
||||
int ReceiptType,
|
||||
string? ProfileId,
|
||||
string TemplatePath)
|
||||
{
|
||||
public bool MatchesExact(int receiptType, string profileId)
|
||||
{
|
||||
return ReceiptType == receiptType &&
|
||||
!string.IsNullOrEmpty(ProfileId) &&
|
||||
ProfileId.Equals(profileId, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public bool MatchesTypeOnly(int receiptType)
|
||||
{
|
||||
return ReceiptType == receiptType && string.IsNullOrEmpty(ProfileId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user