Interface AustraliaPostCustomerInformationDecoder
Abast: Aspose.BarCode.BarCodeRecognition Kompilierung: Aspose.BarCode.dll (26.1.0)
Allgemeines Interface zum Entpacken eines Feldes mit Kundeninformationen, das bei der Kodierung von AustraliaPost verwendet wird. Der Benutzer muss die Implementierung bereitstellen.
public interface AustraliaPostCustomerInformationDecoderParameters
Decode(string)
Entschlüsselung des Kundeninformationsfeldes aus AustraliaPost‑Codes. Kann verwendet werden, um verschiedene mit NTable und CTable codierte Daten zu interpretieren. Daten werden als Reihe von Bandwerten geliefert: 0, 1, 2 oder 3.
string Decode(string customerInformationField)Parameters
customerInformationField Serie
Das Client-Informationsfeld ist als Zeichenkette von Werten codiert: 0, 1, 2 oder 3
Parameters
String in ein Array mit Clientinformationen aufteilen
Parameters
Dieses Beispiel zeigt, wie man Daten mit der Schnittstelle AustraliaPostCustomerInformationDecoder dekodiert.
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();
}