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); } }
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); }