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

ParseCapsTypeOrder() private method

Parse TS_ORDER_CAPABILITYSET
private ParseCapsTypeOrder ( byte data ) : TS_ORDER_CAPABILITYSET
data byte data to be parsed
return TS_ORDER_CAPABILITYSET
        private TS_ORDER_CAPABILITYSET ParseCapsTypeOrder(byte[] data)
        {
            int currentIndex = 0;
            TS_ORDER_CAPABILITYSET set = new TS_ORDER_CAPABILITYSET();

            // TS_ORDER_CAPABILITYSET: capabilitySetType
            set.capabilitySetType = (capabilitySetType_Values)ParseUInt16(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: lengthCapability
            set.lengthCapability = ParseUInt16(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: terminalDescriptor
            set.terminalDescriptor = GetBytes(data, ref currentIndex,
                ConstValue.TS_ORDER_CAPABILITYSET_TERMINAL_DESCRIPTOR_LENGTH);

            // TS_ORDER_CAPABILITYSET: pad4octetsA
            set.pad4octetsA = ParseUInt32(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: desktopSaveXGranularity
            set.desktopSaveXGranularity = ParseUInt16(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: desktopSaveYGranularity
            set.desktopSaveYGranularity = ParseUInt16(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: pad2octetsA
            set.pad2octetsA = ParseUInt16(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: maximumOrderLevel
            set.maximumOrderLevel = ParseUInt16(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: numberFonts
            set.numberFonts = ParseUInt16(data, ref currentIndex, false); ;

            // TS_ORDER_CAPABILITYSET: orderFlags
            set.orderFlags = (orderFlags_Values)ParseUInt16(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: orderSupport
            set.orderSupport = GetBytes(data, ref currentIndex,
                ConstValue.TS_ORDER_CAPABILITYSET_ORDER_SUPPORT_LENGTH);

            // TS_ORDER_CAPABILITYSET: textFlags
            set.textFlags = ParseUInt16(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: orderSupportExFlags
            set.orderSupportExFlags = (orderSupportExFlags_values)ParseUInt16(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: pad4octetsB
            set.pad4octetsB = ParseUInt32(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: desktopSaveSize
            set.desktopSaveSize = ParseUInt32(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: pad2octetsC
            set.pad2octetsC = ParseUInt16(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: pad2octetsD
            set.pad2octetsD = ParseUInt16(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: textANSICodePage
            set.textANSICodePage = ParseUInt16(data, ref currentIndex, false);

            // TS_ORDER_CAPABILITYSET: pad2octetsE
            set.pad2octetsE = ParseUInt16(data, ref currentIndex, false);

            // Check if data length is consistent with the decoded struct length
            VerifyDataLength(data.Length, currentIndex, ConstValue.ERROR_MESSAGE_DATA_LENGTH_INCONSISTENT);
            return set;
        }
RdpbcgrServerDecoder