The TS_INPUT_EVENT structure is used to wrap event-specific information for all slow-path input events.
file:///C:/ts_dev/TestSuites/MS-RDPBCGR/TestSuite/Src/TD/latest_XMLS_16may/RDPBCGR/ _rfc_ms-rdpbcgr2_1_7_1_1_3_1.xml
        /// <summary>
        /// 2.2.8.1.1.3.1.1
        /// </summary>
        /// <param name="input"></param>
        public void VerifyStructure(TS_INPUT_EVENT input)
        {
            bool isR1645Satisfied = input.messageType == TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_MOUSE ||
                input.messageType == TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_MOUSEX ||
                input.messageType == TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_SCANCODE ||
                input.messageType == TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_SYNC ||
                input.messageType == TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_UNICODE ||
                input.messageType == TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_UNUSED;

            site.CaptureRequirementIfIsTrue(isR1645Satisfied, 1645,
                @"In TS_INPUT_EVENT structure,the messageType can be the following:INPUT_EVENT_SYNC 0x0000,"
                + @" INPUT_EVENT_SCANCODE 0x0004, INPUT_EVENT_UNICODE 0x0005, INPUT_EVENT_MOUSE 0x8001, "
                + @"INPUT_EVENT_MOUSEX 0x8002");

            switch(input.messageType )
            {
                case TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_MOUSE:
                    site.CaptureRequirementIfIsInstanceOfType(input.slowPathInputData, typeof(TS_POINTER_EVENT), 1649,
                        @"In TS_INPUT_EVENT structure, when the messageType is INPUT_EVENT_MOUSE 0x8001 "
                        + @"then the input event is a Mouse Event.");
                    break;
                case TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_MOUSEX:
                    site.CaptureRequirementIfIsInstanceOfType(input.slowPathInputData, typeof(TS_POINTERX_EVENT), 1650,
                        @"In TS_INPUT_EVENT structure, when the messageType is INPUT_EVENT_MOUSEX 0x8002"
                        + @" then the input event is an Extended Mouse Event.");
                    break;
                case TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_SCANCODE:
                    site.CaptureRequirementIfIsInstanceOfType(input.slowPathInputData, typeof(TS_KEYBOARD_EVENT), 1647,
                        @"In TS_INPUT_EVENT structure, when the messageType is INPUT_EVENT_SCANCODE 0x0004"
                        + @" then the input event is a Keyboard Event.");
                    break;
                case TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_SYNC:
                    site.CaptureRequirementIfIsInstanceOfType(input.slowPathInputData, typeof(TS_SYNC_EVENT), 1646,
                        @"In TS_INPUT_EVENT structure, when the messageType is INPUT_EVENT_SYNC 0x0000 then"
                        + @" the input event is a Synchronize Event");
                    break;
                case TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_UNICODE:
                    site.CaptureRequirementIfIsInstanceOfType(input.slowPathInputData, typeof(TS_UNICODE_KEYBOARD_EVENT), 1648,
                        @"In TS_INPUT_EVENT structure, when the messageType is INPUT_EVENT_UNICODE 0x0005 "
                        + @"then the input event is a Unicode Keyboard Event.");
                    break;
            }
        }
        /// <summary>
        /// Parse TS_INPUT_EVENT
        /// (parser index is updated according to parsed length)
        /// </summary>
        /// <param name="data">data to be parsed</param>
        /// <param name="currentIndex">current parser index</param>
        /// <returns>TS_INPUT_EVENT</returns>
        private TS_INPUT_EVENT ParseSlowPathInputEvent(byte[] data, ref int currentIndex)
        {
            TS_INPUT_EVENT inputEvent = new TS_INPUT_EVENT();
            inputEvent.eventTime = ParseUInt32(data, ref currentIndex, false);
            inputEvent.messageType = (TS_INPUT_EVENT_messageType_Values)ParseUInt16(data, ref currentIndex, false);
            switch (inputEvent.messageType)
            {
                case TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_SYNC:
                    inputEvent.slowPathInputData = ParseSyncEvent(data, ref currentIndex);
                    break;
                case TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_SCANCODE:
                    inputEvent.slowPathInputData = ParseKeyboardEvent(data, ref currentIndex);
                    break;
                case TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_UNICODE:
                    inputEvent.slowPathInputData = ParseUniKeyboardEvent(data, ref currentIndex);
                    break;
                case TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_MOUSE:
                    inputEvent.slowPathInputData = ParseMouseEvent(data, ref currentIndex);
                    break;
                case TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_MOUSEX:
                    inputEvent.slowPathInputData = ParseExtMouseEvent(data, ref currentIndex);
                    break;
                case TS_INPUT_EVENT_messageType_Values.INPUT_EVENT_UNUSED:
                    inputEvent.slowPathInputData = ParseUnusedEvent(data, ref currentIndex);
                    break;
                default:
                    throw new FormatException(ConstValue.ERROR_MESSAGE_ENUM_UNRECOGNIZED);
            }

            return inputEvent;
        }