Interface AustraliaPostCustomerInformationDecoder
Interface AustraliaPostCustomerInformationDecoder
آبست: Aspose.BarCode.BarCodeRecognition ساخت: Aspose.BarCode.dll (26.1.0)
رابط کلی برای باز کردن یک فیلد حاوی اطلاعات مشتریان که در کدگذاری AustraliaPost استفاده میشود. کاربر باید پیادهسازی را فراهم کند.
public interface AustraliaPostCustomerInformationDecoderParameters
Decode(string)
رمزگشایی فیلد اطلاعات مشتری بر پایه کدهای AustraliaPost‑Codes. میتواند برای تفسیر دادههای مختلف کدگذاریشده با NTable و CTable استفاده شود. دادهها بهصورت یک سری مقادیر منطقهای ارائه میشوند: 0, 1, 2 یا 3.
string Decode(string customerInformationField)Parameters
customerInformationField Parameters
فیلد اطلاعات مشتری بهصورت یک رشته الفبایی عددی با مقادیر ۰، ۱، ۲ یا ۳ کدگذاری میشود.
Parameters
تقسیم رشته به آرایه با اطلاعات مشتری
Parameters
این مثال نشان میدهد چگونه دادهها را با رابط 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();
}