Class BarCodeMatcherParser
A helper for parsing various bar code matchers.
public static class BarCodeMatcherParser
- Inheritance
-
BarCodeMatcherParser
- Inherited Members
Methods
Parse(string?, string)
Creates a new bar code matcher by parsing syntax and format strings.
public static BarCodeMatcher Parse(string? syntax, string format)
Parameters
syntaxstringAn optional syntax name (case-insensitive) that specifies what type of bar code matcher should be created. See the remarks for the allowed values.
formatstringThe syntax-specific format for the bar code definition. See the remarks for details.
Returns
- BarCodeMatcher
The parsed bar code matcher.
Remarks
This will validate that all number identifiers match the ones in Collection.
The following syntax values are supported (case-insensitive):
Text(this is the default issyntaxis null or empty)This will create a WildcardExpressionBarCodeMatcher, where
formatshould be a wildcard expression pattern with captures named with the Acuit Pinpoint number identifiers.IsoIec15434Format06This will create an IsoIec15434Format06BarCodeMatcher, where
formatis expected to contain a semicolon-separated list of name/value pairs, where each name defines an ISO/IEC-15434 format 06 data identifier and each value defines the Acuit Pinpoint number identifier.For example:
P=model;S=serial
Exceptions
- ArgumentException
syntaxis not a valid bar code syntax name.- ArgumentNullException
formatis null.- FormatException
formatis not a valid format for the given syntax.- ArgumentException
formatdoes not extract any numbers from bar code content for the given syntax.