Interface AustraliaPostCustomerInformationDecoder
Interface AustraliaPostCustomerInformationDecoder
Namespace: Aspose.BarCode.BarCodeRecognition
Assembly: Aspose.BarCode.dll (25.1.0)
Veřejné rozhraní pro dekódování pole informací o zákazníkovi, které se používá v symbolice AustraliaPost. Implementaci by měl poskytnout uživatel.
public interface AustraliaPostCustomerInformationDecoder
Metody
Decode(string)
Dekóduje pole informací o zákazníkovi ze symboliky AustraliaPost. Může být použito pro různé interpretace dat z kódování NTable a CTable. Data jsou poskytována jako řada hodnot: 0, 1, 2 nebo 3.
string Decode(string customerInformationField)
Parametry
customerInformationField
string
Pole informací o zákazníkovi zakódované jako řada surových hodnot: 0, 1, 2 nebo 3
Vrací
dekódovaný řetězec pole informací o zákazníkovi
Příklady
Tento příklad ukazuje, jak dekódovat data pomocí rozhraní 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();
}