Table of Contents

Class Result

Namespace
ZXing
Assembly
zxing.dll

Encapsulates the result of decoding a barcode within an image.

public sealed class Result
Inheritance
Result
Inherited Members

Constructors

Result(string, byte[], int, ResultPoint[], BarcodeFormat)

Initializes a new instance of the Result class.

public Result(string text, byte[] rawBytes, int numBits, ResultPoint[] resultPoints, BarcodeFormat format)

Parameters

text string

The text.

rawBytes byte[]

The raw bytes.

numBits int
resultPoints ResultPoint[]

The result points.

format BarcodeFormat

The format.

Result(string, byte[], int, ResultPoint[], BarcodeFormat, long)

Initializes a new instance of the Result class.

public Result(string text, byte[] rawBytes, int numBits, ResultPoint[] resultPoints, BarcodeFormat format, long timestamp)

Parameters

text string

The text.

rawBytes byte[]

The raw bytes.

numBits int
resultPoints ResultPoint[]

The result points.

format BarcodeFormat

The format.

timestamp long

The timestamp.

Result(string, byte[], ResultPoint[], BarcodeFormat)

Initializes a new instance of the Result class.

public Result(string text, byte[] rawBytes, ResultPoint[] resultPoints, BarcodeFormat format)

Parameters

text string

The text.

rawBytes byte[]

The raw bytes.

resultPoints ResultPoint[]

The result points.

format BarcodeFormat

The format.

Result(string, byte[], ResultPoint[], BarcodeFormat, long)

Initializes a new instance of the Result class.

public Result(string text, byte[] rawBytes, ResultPoint[] resultPoints, BarcodeFormat format, long timestamp)

Parameters

text string

The text.

rawBytes byte[]

The raw bytes.

resultPoints ResultPoint[]

The result points.

format BarcodeFormat

The format.

timestamp long

The timestamp.

Properties

BarcodeFormat

public BarcodeFormat BarcodeFormat { get; }

Property Value

BarcodeFormat

{@link BarcodeFormat} representing the format of the barcode that was decoded

NumBits

how many bits of RawBytes are valid; typically 8 times its length

public int NumBits { get; }

Property Value

int

RawBytes

public byte[] RawBytes { get; }

Property Value

byte[]

raw bytes encoded by the barcode, if applicable, otherwise

null

ResultMetadata

public IDictionary<ResultMetadataType, object> ResultMetadata { get; }

Property Value

IDictionary<ResultMetadataType, object>

{@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be

null
. This contains optional metadata about what was detected about the barcode,

like orientation.

ResultPoints

public ResultPoint[] ResultPoints { get; }

Property Value

ResultPoint[]

points related to the barcode in the image. These are typically points identifying finder patterns or the corners of the barcode. The exact meaning is specific to the type of barcode that was decoded.

Text

public string Text { get; }

Property Value

string

raw text encoded by the barcode, if applicable, otherwise

null

Timestamp

Gets the timestamp.

public long Timestamp { get; }

Property Value

long

Methods

ToString()

Returns a string that represents this instance.

public override string ToString()

Returns

string

A string that represents this instance.

addResultPoints(ResultPoint[])

Adds the result points.

public void addResultPoints(ResultPoint[] newPoints)

Parameters

newPoints ResultPoint[]

The new points.

putAllMetadata(IDictionary<ResultMetadataType, object>)

Adds a list of metadata to the result

public void putAllMetadata(IDictionary<ResultMetadataType, object> metadata)

Parameters

metadata IDictionary<ResultMetadataType, object>

The metadata.

putMetadata(ResultMetadataType, object)

Adds one metadata to the result

public void putMetadata(ResultMetadataType type, object value)

Parameters

type ResultMetadataType

The type.

value object

The value.