示例#1
0
 public SmppTlv(byte[] Data)
 {
     Items = new ArrayList(10);
     if (Data != null)
     {
         short num3;
         var   builder = new ByteBuilder(Data);
         for (int i = 0; i < builder.Count; i += 4 + num3)
         {
             short tagId = SmppConverter.FromByteArrayToInt16(builder.ToArray(i, 2));
             num3 = SmppConverter.FromByteArrayToInt16(builder.ToArray(i + 2, 2));
             byte[] buffer = builder.ToArray(i + 4, num3);
             var    tag    = new Tag(tagId);
             tag.SetByteArray(buffer);
             Items.Add(tag);
         }
     }
 }
示例#2
0
 public int GetInt16()
 {
     return(SmppConverter.FromByteArrayToInt16(_Value));
 }