public DynamicVCPDU ToPdu(byte[] data)
{
if (null == regsiteredPDUs)
{
regsiteredPDUs = new List<DynamicVCPDU>();
RegisterDefaultPdus();
}
DynamicVCPDU res = null;
foreach (DynamicVCPDU pdu in regsiteredPDUs)
{
if (PduMarshaler.Unmarshal(data, pdu))
{
res = pdu;
break;
}
}
if (res == null)
{
DynamicVCException.Throw("UnknownDynamicVCPDU was not registered.");
}
return res;
}