Table of Contents

Class BarCodeMatcherParser

Namespace
Acuit.Pinpoint.Common.BarCodes
Assembly
Acuit.Pinpoint.Common.dll

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

syntax string

An optional syntax name (case-insensitive) that specifies what type of bar code matcher should be created. See the remarks for the allowed values.

format string

The 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 is syntax is null or empty)

    This will create a WildcardExpressionBarCodeMatcher, where format should be a wildcard expression pattern with captures named with the Acuit Pinpoint number identifiers.

  • IsoIec15434Format06

    This will create an IsoIec15434Format06BarCodeMatcher, where format is 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

syntax is not a valid bar code syntax name.

ArgumentNullException

format is null.

FormatException

format is not a valid format for the given syntax.

ArgumentException

format does not extract any numbers from bar code content for the given syntax.