Skip to content

Commit 2aec252

Browse files
1) Added support for reporting the barcode scanner performance in characters per second.
2) Fixed an issue where the Calibrator would incorrectly infer that the scanner is compensationg for Caps Lock. 3) Fixed an issue where, when an ambiguity occurs for a control character, a character map entry is incorrectly created. 4) Improved the advice handling for EDI issues.
1 parent 90dbb74 commit 2aec252

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

Solidsoft.Reply.Parsers.Gs1Ai/Descriptors/CouponCodeDescriptor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class CouponCodeDescriptor(
6060
/// <summary>
6161
/// A regular expression for North American coupon codes.
6262
/// </summary>
63-
private static readonly Regex CouponCodeRegex = new (@"^[0-6]\d{6,12}\d{6}[1-5]\d{1,5}[1-5]\d{1,5}[0-49]\d{3}(1[0-3][1-5]\d{1,5}[0-49]\d{3}[0-6]\d{6,12}(2[1-5]\d{1,5}[0-49]\d{3}[0-6]\d{6,12})?)?" + $"(3{DatePattern})?(4{DatePattern})?" + @"(5[0-9]\d{6,15})?(6[1-7]\d{7,13})?(9[0-256][0-2]\d[01])?$");
63+
private static readonly Regex CouponCodeRegex = new(@"^[0-6]\d{6,12}\d{6}[1-5]\d{1,5}[1-5]\d{1,5}[0-49]\d{3}(1[0-3][1-5]\d{1,5}[0-49]\d{3}[0-6]\d{6,12}(2[1-5]\d{1,5}[0-49]\d{3}[0-6]\d{6,12})?)?" + $"(3{DatePattern})?(4{DatePattern})?" + @"(5[0-9]\d{6,15})?(6[1-7]\d{7,13})?(9[0-256][0-2]\d[01])?$");
6464
#endif
6565

6666
/// <summary>

Solidsoft.Reply.Parsers.Gs1Ai/EntityResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3884,7 +3884,7 @@ private static bool IsNumberInRange(
38843884
return data.Length >= startIndex + length
38853885
&& int.TryParse(
38863886
#if NET6_0_OR_GREATER
3887-
data[startIndex.. (length + startIndex)],
3887+
data[startIndex..(length + startIndex)],
38883888
#else
38893889
data.Substring(startIndex, length + startIndex - 1),
38903890
#endif

Solidsoft.Reply.Parsers.Gs1Ai/Extensions.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static class Extensions {
5959
/// A dictionary of GS1 company prefixes.
6060
/// </summary>
6161
private static readonly Dictionary<int, CountryCode> CompanyPrefixes =
62-
new ()
62+
new()
6363
{
6464
{ 100, CountryCode.UnitedStates },
6565
{ 101, CountryCode.UnitedStates },
@@ -668,12 +668,12 @@ public static class Extensions {
668668
/// <summary>
669669
/// UPC-A Compatible regular expression.
670670
/// </summary>
671-
private static readonly Regex UpcACompatibleRegex = new ("^\\d*$");
671+
private static readonly Regex UpcACompatibleRegex = new("^\\d*$");
672672

673673
/// <summary>
674674
/// UPC-A Compatible UnitedStates and Canada regular expression.
675675
/// </summary>
676-
private static readonly Regex UpcaCompatibleUnitedStatesAndCanadaRegex = new ("^\\d((0000[1-9])|(000[1-9])|(0[01][0-9]))\\d*$");
676+
private static readonly Regex UpcaCompatibleUnitedStatesAndCanadaRegex = new("^\\d((0000[1-9])|(000[1-9])|(0[01][0-9]))\\d*$");
677677
#endif
678678

679679
/// <summary>
@@ -685,16 +685,16 @@ public static CountryCode ResolveGtinNtinToGs1Country(this string productCode) {
685685
return string.IsNullOrWhiteSpace(productCode)
686686
? CountryCode.Unknown
687687

688-
/* Unmerged change from project 'Solidsoft.Reply.Parsers.Gs1Ai (netstandard2.0)'
689-
Before:
690-
: TestProductCodeLengthGt3();
688+
/* Unmerged change from project 'Solidsoft.Reply.Parsers.Gs1Ai (netstandard2.0)'
689+
Before:
690+
: TestProductCodeLengthGt3();
691691
692-
#pragma warning disable SA1001 // Commas should be spaced correctly
693-
#pragma warning disable SA1113 // Comma should be on the same line as previous parameter
694-
#pragma warning disable SA1115 // Parameter should follow comma
695-
After:
696-
: TestProductCodeLengthGt3();
697-
*/
692+
#pragma warning disable SA1001 // Commas should be spaced correctly
693+
#pragma warning disable SA1113 // Comma should be on the same line as previous parameter
694+
#pragma warning disable SA1115 // Parameter should follow comma
695+
After:
696+
: TestProductCodeLengthGt3();
697+
*/
698698
: TestProductCodeLengthGt3();
699699
CountryCode TestSheetMusicSpecifier() =>
700700

Solidsoft.Reply.Parsers.Gs1Ai/Parser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static class Parser {
3939
/// <summary>
4040
/// Dictionary of AI values (the first two digits in an entity) of elements with a pre-defined length.
4141
/// </summary>
42-
private static readonly Dictionary<string, int> FirstTwoDigitsTable = new ()
42+
private static readonly Dictionary<string, int> FirstTwoDigitsTable = new()
4343
{
4444
{ "00", 20 },
4545
{ "01", 16 },

0 commit comments

Comments
 (0)