Interface AustraliaPostCustomerInformationDecoder

Interface AustraliaPostCustomerInformationDecoder

Namespace: Aspose.BarCode.BarCodeRecognition
Assembly: Aspose.BarCode.dll (25.1.0)

オーストラリアポストのシンボルで使用される顧客情報フィールドのデコードのための公開インターフェース。実装はユーザーによって提供されるべきです。

public interface AustraliaPostCustomerInformationDecoder

メソッド

Decode(string)

オーストラリアポストのシンボルから顧客情報フィールドをデコードします。
NTableおよびCTableエンコーディングからの異なるデータ解釈に使用できます。
データはバー値の行として提供されます:0、1、2、または3。

string Decode(string customerInformationField)

パラメーター

customerInformationField string

生のバー値の行としてエンコードされた顧客情報フィールド:0、1、2、または3

戻り値

string

デコードされた顧客情報フィールドの文字列

このサンプルは、AustraliaPostCustomerInformationDecoderインターフェースを使用してデータをデコードする方法を示しています。

string[] N_Table = { "00", "01", "02", "10", "11", "12", "20", "21", "22", "30" };
public string Decode(string customerInformationField)
{
    StringBuilder bd = new StringBuilder();
    for (int i = 0; customerInformationField.Length > i; i += 2)
    {
        if (customerInformationField.Length >= i + 2)
        {
            string tmp = customerInformationField.Substring(i, 2);
            for (int j = 0; N_Table.Length > j; j++)
            {
                if (N_Table[j].Equals(tmp))
                {
                    bd.Append(j);
                    break;
                }
            }
        }
    }
     return bd.ToString();
}
 日本語