public override byte[] ToBytes()
{
List<byte> totalBuffer = new List<byte>();
RdpbcgrEncoder.EncodeStructure(totalBuffer, tpktHeader);
RdpbcgrEncoder.EncodeStructure(totalBuffer, x224Data);
DomainMCSPDU mcsDomain = new DomainMCSPDU(DomainMCSPDU.attachUserConfirm, attachUserConfirm);
RdpbcgrEncoder.EncodeDomainMcsPdu(totalBuffer, mcsDomain);
byte[] encodedBytes = RdpbcgrUtility.ToBytes(totalBuffer);
// ToDo: Ugly dump message code here
// ETW Provider Dump Code
RdpbcgrUtility.ETWProviderDump(this.GetType().Name, encodedBytes);
return encodedBytes;
}