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

ParseCapsTypeInput() private method

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

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

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

            // TS_INPUT_CAPABILITYSET: inputFlags
            set.inputFlags = (inputFlags_Values)ParseUInt16(data, ref currentIndex, false);

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

            // TS_INPUT_CAPABILITYSET: keyboardLayout
            set.keyboardLayout = ParseUInt32(data, ref currentIndex, false);

            // TS_INPUT_CAPABILITYSET: keyboardType
            set.keyboardType = (TS_INPUT_CAPABILITYSET_keyboardType_Values)ParseUInt32(data, ref currentIndex, false);

            // TS_INPUT_CAPABILITYSET: keyboardSubType
            set.keyboardSubType = ParseUInt32(data, ref currentIndex, false);

            // TS_INPUT_CAPABILITYSET: keyboardFunctionKey
            set.keyboardFunctionKey = ParseUInt32(data, ref currentIndex, false);

            // TS_INPUT_CAPABILITYSET: imeFileName
            byte[] imeFileName = GetBytes(data, ref currentIndex,
                ConstValue.TS_INPUT_CAPABILITY_SET_IME_FILE_NAME_LENGTH);
            set.imeFileName = BitConverter.ToString(imeFileName);

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