Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpbcgr.RdpbcgrServerDecoder.ParseTsUdCsNet C# (CSharp) Method

ParseTsUdCsNet() private method

Parse TS_UD_CS_NET (parser index is updated according to parsed length)
private ParseTsUdCsNet ( byte data, int &currentIndex ) : TS_UD_CS_NET
data byte data to be parsed
currentIndex int current parser index
return TS_UD_CS_NET
        private TS_UD_CS_NET ParseTsUdCsNet(byte[] data, ref int currentIndex)
        {
            TS_UD_CS_NET netData = new TS_UD_CS_NET();

            // TS_UD_CS_NET: Header
            netData.header.type = (TS_UD_HEADER_type_Values)ParseUInt16(data, ref currentIndex, false);
            netData.header.length = ParseUInt16(data, ref currentIndex, false);

            // TS_UD_SC_NET: channelCount
            netData.channelCount = ParseUInt32(data, ref currentIndex, false);

            // TS_UD_SC_NET: channelIdArray
            netData.channelDefArray = new List<CHANNEL_DEF>();
            for (int i = 0; i < netData.channelCount; i++)
            {
                CHANNEL_DEF channelDef;
                byte[] name = GetBytes(data, ref currentIndex, 8);
                ASCIIEncoding converter = new ASCIIEncoding();
                channelDef.name = converter.GetString(name) ;
                channelDef.options = (Channel_Options)ParseUInt32(data, ref currentIndex, false);
                netData.channelDefArray.Add(channelDef);
            }

            return netData;
        }
RdpbcgrServerDecoder