X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=csharp%2FResultMetadataType.cs;h=d57ae2778424fe9ef50fad1afe1820f9870adfbe;hb=fa9bfee1b50468fdced440e323c6ffe7cb53b12e;hp=5a371300fda8f35b1cd2d0853a2783c238d28ef2;hpb=e35d358134873c3f640672da7cd0c01f02253151;p=zxing.git diff --git a/csharp/ResultMetadataType.cs b/csharp/ResultMetadataType.cs index 5a371300..d57ae277 100755 --- a/csharp/ResultMetadataType.cs +++ b/csharp/ResultMetadataType.cs @@ -1,4 +1,6 @@ -/* +/* +* Copyright 2008 ZXing authors +* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,53 +13,56 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - using System; -using System.Collections; - namespace com.google.zxing { + + /// Represents some type of metadata about the result of the decoding that the decoder + /// wishes to communicate back to the caller. + /// + /// + /// Sean Owen + /// + /// www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + /// - /// The general exception class throw when something goes wrong during decoding of a barcode. - /// This includes, but is not limited to, failing checksums / error correction algorithms, being - /// unable to locate finder timing patterns, and so on. - /// - /// - /// srowen@google.com (Sean Owen) - /// - //[Serializable] - public sealed class ResultMetadataType - { - // No, we can't use an enum here. J2ME doesn't support it. - - /** - * Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. - */ - public static ResultMetadataType OTHER = new ResultMetadataType(); - - /** - * Denotes the likely approximate orientation of the barcode in the image. This value - * is given as degrees rotated clockwise from the normal, upright orientation. - * For example a 1D barcode which was found by reading top-to-bottom would be - * said to have orientation "90". This key maps to an {@link Integer} whose - * value is in the range [0,360). - */ - public static ResultMetadataType ORIENTATION = new ResultMetadataType(); - - /** - *

2D barcode formats typically encode text, but allow for a sort of 'byte mode' - * which is sometimes used to encode binary data. While {@link Result} makes available - * the complete raw bytes in the barcode for these formats, it does not offer the bytes - * from the byte segments alone.

- * - *

This maps to a {@link java.util.Vector} of byte arrays corresponding to the - * raw bytes in the byte segments in the barcode, in order.

- */ - public static ResultMetadataType BYTE_SEGMENTS = new ResultMetadataType(); - - private ResultMetadataType() { - } - - - } + public sealed class ResultMetadataType + { + + // No, we can't use an enum here. J2ME doesn't support it. + + /// Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + //UPGRADE_NOTE: Final was removed from the declaration of 'OTHER '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'" + public static readonly ResultMetadataType OTHER = new ResultMetadataType(); + + /// Denotes the likely approximate orientation of the barcode in the image. This value + /// is given as degrees rotated clockwise from the normal, upright orientation. + /// For example a 1D barcode which was found by reading top-to-bottom would be + /// said to have orientation "90". This key maps to an {@link Integer} whose + /// value is in the range [0,360). + /// + //UPGRADE_NOTE: Final was removed from the declaration of 'ORIENTATION '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'" + public static readonly ResultMetadataType ORIENTATION = new ResultMetadataType(); + + ///

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + /// which is sometimes used to encode binary data. While {@link Result} makes available + /// the complete raw bytes in the barcode for these formats, it does not offer the bytes + /// from the byte segments alone.

+ /// + ///

This maps to a {@link java.util.Vector} of byte arrays corresponding to the + /// raw bytes in the byte segments in the barcode, in order.

+ ///
+ //UPGRADE_NOTE: Final was removed from the declaration of 'BYTE_SEGMENTS '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'" + public static readonly ResultMetadataType BYTE_SEGMENTS = new ResultMetadataType(); + + /// Error correction level used, if applicable. The value type depends on the + /// format, but is typically a String. + /// + //UPGRADE_NOTE: Final was removed from the declaration of 'ERROR_CORRECTION_LEVEL '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'" + public static readonly ResultMetadataType ERROR_CORRECTION_LEVEL = new ResultMetadataType(); + + private ResultMetadataType() + { + } + } } \ No newline at end of file