Interface AustraliaPostCustomerInformationDecoder
Interface AustraliaPostCustomerInformationDecoder
Namespace: Aspose.BarCode.BarCodeRecognition
Assembly: Aspose.BarCode.dll (25.1.0)
อินเทอร์เฟซสาธารณะสำหรับการถอดรหัสฟิลด์ข้อมูลลูกค้า ซึ่งใช้ในสัญลักษณ์ AustraliaPost ผู้ใช้ต้องจัดเตรียมการนำไปใช้
public interface AustraliaPostCustomerInformationDecoder
วิธีการ
Decode(string)
ถอดรหัสฟิลด์ข้อมูลลูกค้าจากสัญลักษณ์ AustraliaPost
สามารถใช้สำหรับการตีความข้อมูลที่แตกต่างกันจากการเข้ารหัส NTable และ CTable
ข้อมูลจะถูกจัดเตรียมเป็นแถวของค่าบาร์: 0, 1, 2 หรือ 3
string Decode(string customerInformationField)
พารามิเตอร์
customerInformationField
string
ฟิลด์ข้อมูลลูกค้าที่เข้ารหัสเป็นแถวของค่าบาร์ดิบ: 0, 1, 2 หรือ 3
คืนค่า
สตริงฟิลด์ข้อมูลลูกค้าที่ถูกถอดรหัส
ตัวอย่าง
ตัวอย่างนี้แสดงวิธีการถอดรหัสข้อมูลด้วยอินเทอร์เฟซ 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();
}