Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpbcgr.Server_MCS_Channel_Join_Confirm_Pdu.ToBytes C# (CSharp) Method

ToBytes() public method

Encode this structure into byte array.
public ToBytes ( ) : byte[]
return byte[]
        public override byte[] ToBytes()
        {
            List<byte> totalBuffer = new List<byte>();

            RdpbcgrEncoder.EncodeStructure(totalBuffer, tpktHeader);
            RdpbcgrEncoder.EncodeStructure(totalBuffer, x224Data);

            DomainMCSPDU mcsDomain = new DomainMCSPDU(DomainMCSPDU.channelJoinConfirm, channelJoinConfirm);
            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;
        }