Interface AustraliaPostCustomerInformationDecoder

Interface AustraliaPostCustomerInformationDecoder

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

Interface publique pour le décodage du champ d’informations client utilisé dans la symbologie AustraliaPost. L’implémentation doit être fournie par l’utilisateur.

public interface AustraliaPostCustomerInformationDecoder

Méthodes

Decode(string)

Décode le champ d’informations client à partir de la symbologie AustraliaPost.
Peut être utilisé pour différentes interprétations de données à partir de l’encodage NTable et CTable.
Les données sont fournies sous forme de ligne de valeurs de barres : 0, 1, 2 ou 3.

string Decode(string customerInformationField)

Paramètres

customerInformationField string

Le champ d’informations client encodé sous forme de ligne de valeurs de barres brutes : 0, 1, 2 ou 3

Retourne

string

la chaîne du champ d’informations client décodé

Exemples

Cet exemple montre comment décoder des données avec l’interface 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();
}
 Français