Deprecation warning
Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.
We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.
You'll find the updated documentation at: Data Capture SDK Documentation for Xamarin.Android and Data Capture SDK Documentation for Xamarin.iOS
Public Member Functions | |
ParserResult | ParseString (string str, NSError error) |
ParserResult | ParseRawData (NSData rawData, NSError error) |
bool | SetOptions (NSDictionary options, NSError error) |
Detailed Description
Defines the interface for a data string parser.
Parsers are capable of parsing one particular data format, which is passed to them during construction.
Member Function Documentation
ParserResult ParseString | ( | string | str, |
NSError | error | ||
) |
Parses the data string and returns the contained fields in the result object.
In case the result could not be parsed, the error message is accessible as part of the outError parameter.
- Since
- 5.5.0
- Parameters
-
str The string to parse. Must not be nil. error Upon failure will be set to an instance of NSError containing details on why the data could not be parsed. Can be nil.
- Returns
- The result object. Before accessing the fields of the result, you must ensure that the string was correctly parsed, that is, outError has not been set.
ParserResult ParseRawData | ( | NSData | rawData, |
NSError | error | ||
) |
Parses the raw data of the code and returns the contained fields in the result object.
In case the result could not be parsed, the error message is accessible as part of the outError parameter.
- Since
- 5.5.0
- Parameters
-
rawData The raw data of the string to parse. Must not be nil. error Upon failure will be set to an instance of NSError containing details on why the data could not be parsed. Can be nil.
- Returns
- The result object. Before accessing the fields of the result, you must ensure that the string was correctly parsed, that is, outError has not been set.
bool SetOptions | ( | NSDictionary | options, |
NSError | error | ||
) |
Set options.
- Since
- 5.5.0
- Parameters
-
options The parser options. error Upon failure, will contain further details.
- Returns
- Returns true on success