Interface AustraliaPostCustomerInformationDecoder
Interface AustraliaPostCustomerInformationDecoder
Namespace: Aspose.BarCode.BarCodeRecognition
Assembly: Aspose.Bar.Code.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();
}