You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
640 B
24 lines
640 B
namespace Barcoded
|
|
{
|
|
internal class Ean138Validator : ILinearValidator
|
|
{
|
|
public string Parse(string text, Symbology symbology)
|
|
{
|
|
switch (symbology)
|
|
{
|
|
case Symbology.Ean13:
|
|
return LinearHelpers.GetOnlyNumeric(text, 12);
|
|
|
|
case Symbology.UpcA:
|
|
return LinearHelpers.GetOnlyNumeric(text, 11);
|
|
|
|
case Symbology.Ean8:
|
|
return LinearHelpers.GetOnlyNumeric(text, 7);
|
|
|
|
default:
|
|
return LinearHelpers.GetOnlyNumeric(text, 12);
|
|
}
|
|
}
|
|
}
|
|
}
|