コード例 #1
0
 public override byte[] GetMessageBytes()
 {
     //Check if optional parameter message_payload is present
     Tlv.Tlv tlv = Tlv.GetTlvByTag(Tag.message_payload);
     if (tlv == null)
     {
         return(null);
     }
     else
     {
         return(tlv.RawValue);
     }
 }
コード例 #2
0
 public override void SetMessageBytes(byte[] message)
 {
     if (message == null)
     {
         throw new ArgumentNullException("message");
     }
     //Check if optional parameter message_payload is present
     Tlv.Tlv tlv = Tlv.GetTlvByTag(Tag.message_payload);
     if (tlv == null)
     {
         throw new InvalidOperationException("Tlv parameter 'message_payload' is not present");
     }
     tlv.ParseValue(message);
 }