File tree Expand file tree Collapse file tree 1 file changed +38
-1
lines changed
Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Original file line number Diff line number Diff line change 1- # Ecia.Barcode.Parser
1+ # Ecia.Barcode.Parser
2+ ` Ecia.Barcode.Parser ` provides the ability to easily parse ECIA barcode strings.
3+
4+ ## Install Package
5+
6+ [ ![ NuGet] ( https://img.shields.io/nuget/v/Ecia.Barcode.Parser )] ( https://www.nuget.org/packages/Ecia.Barcode.Parser/ )
7+
8+ Available on [ NuGet] ( http://www.nuget.org/packages/Ecia.Barcode.Parser ) .
9+
10+ Install with the dotnet CLI: ` dotnet add package Ecia.Barcode.Parser ` , or through the NuGet Package Manager in Visual Studio.
11+
12+ ## Usage
13+ See the [ sample app] ( ./sample/Ecia.Barcode.Parser.Sample/Program.cs ) for a basic example!
14+ #### Getting an instance of the Parser
15+
16+ Dependency Injection
17+ ``` csharp
18+ var appBuilder = WebApplication .CreateBuilder (args );
19+ appBuilder .Services .AddTransient <IEciaBarcodeParser , EciaBarcodeParser >();
20+ ```
21+ Without DI
22+ ``` csharp
23+ var parser = new EciaBarcodeParser ();
24+ ```
25+
26+ #### Parsing a Barcode string
27+ ``` csharp
28+ var barcodeString = " some ecia barcode string" ;
29+ var parser = new EciaBarcodeParser ();
30+ ParsedBarcode parsedBarcode = parser .ParseBarcode (barcodeString );
31+ ```
32+
33+ #### Basic ECIA compliance validation
34+ ``` csharp
35+ ParsedBarcode parsedBarcode = parser .ParseBarcode (barcodeString );
36+ // LabelFormat is used to determine the required identifiers. Omit or use LabelFormat.Unkown when the LabelFormat isn't known!
37+ ValidationResult validationResult = parser .ValidateParsedBarcodeCompliance (parsedBarcode , LabelFormat .PackingSlip );
38+ ```
You can’t perform that action at this time.
0 commit comments