public override byte[] GetBytes() {
byte[] tmp=this.Data;
base._length=(ushort)(7+tmp.Length);
byte[] buf=base.GetBytes();
int ptr=buf[0]==1?4:2;
buf[ptr++]=(byte)((Dup?0x80:0) | (((int)qualityOfService)<<5) | (Retained?0x10:0) | ((int)topicIdType));
buf[ptr++]=(byte)(TopicId>>8);
buf[ptr++]=(byte)(TopicId);
buf[ptr++]=(byte)(MessageId>>8);
buf[ptr++]=(byte)(MessageId);
Array.Copy(tmp, 0, buf, ptr, tmp.Length);
Dup=true;
return buf;
}
public bool Dup;