/// <summary>
        /// Validate the MESSAGE_HEADER of request message.
        /// </summary>
        /// <param name="messageHeader">A MESSAGE_HEADER in the request message.</param>
        private void ValidateRequestMessageHeader(MESSAGE_HEADER messageHeader)
        {
            // Capture MS-PCHC R15
            string typeofMinorVersion = messageHeader.MinorVersion.GetType().ToString();
            string typeofMajorVersion = messageHeader.MajorVersion.GetType().ToString();
            int versionSize = 0;
            if (typeofMinorVersion.Equals("System.Byte") && typeofMajorVersion.Equals("System.Byte"))
            {
                versionSize = 2;
            }

            Site.CaptureRequirementIfAreEqual<int>(
                2,
                versionSize,
                15,
                @"[In MESSAGE_HEADER] Version (2 bytes): The message version,
                expressed as major and minor values.");

            // Add the debug information
            Site.Log.Add(
                LogEntryKind.Debug,
                @"Verify MS-PCHC_R17, capture it directly for the message header is unmarshalled correctly from stack.");

            // Capture MS-PCHC R17
            Site.CaptureRequirement(
                17,
                @"[In MESSAGE_HEADER] Note that the order of the subfields[MinorVersion,MajorVersion]
                is reversed; the MinorVersion subfield occurs first.");

            // Capture MS-PCHC R18
            Site.CaptureRequirementIfAreEqual<byte>(
                0x00,
                messageHeader.MinorVersion,
                18,
                "[In MESSAGE_HEADER] MinorVersion (1 byte):  The minor part of the version, which MUST be 0x00.");

            // Capture MS-PCHC R19
            Site.CaptureRequirementIfAreEqual<byte>(
                0x01,
                messageHeader.MajorVersion,
                19,
                "[In MESSAGE_HEADER] MajorVersion (1 byte):  The major part of the version, which MUST be 0x01.");

            // Add the debug information
            Site.Log.Add(
                LogEntryKind.Debug,
                @"Verify MS-PCHC_R16:The Version is 1.0. The minor version is 0x00 and verified in MS-PCHC_R18,
                major version is 0x01 and verified in MS-PCHC_R19,
                the actual minor versionis {0} and the actual major version is{1}",
                (int)messageHeader.MajorVersion,
                (int)messageHeader.MinorVersion);

            // Capture MS-PCHC R16
            Site.CaptureRequirement(
                16,
                "[In MESSAGE_HEADER] The version[expressed as major and minor values] MUST be 1.0.");

            // Capture MS-PCHC R20
            int messageTypeSize = sizeof(PCHCMessageType);
            Site.CaptureRequirementIfAreEqual<int>(
                2,
                messageTypeSize,
                20,
                "[In MESSAGE_HEADER] Type (2 bytes):  A 16-bit unsigned integer .");

            // Capture MS-PCHC R23
            Site.CaptureRequirementIfAreEqual<int>(
                4,
                messageHeader.Padding.Length,
                23,
                "[In MESSAGE_HEADER] Padding (4 bytes).");

            // Add the debug information
            Site.Log.Add(
                LogEntryKind.Debug,
                @"Verify MS-PCHC_R14:The messageHeader is an instance of MESSAGE_HEADER.
                Above requirements about Version, Type, Padding are already valideted.");

            // Capture MS-PCHC R14
            Site.CaptureRequirement(
                14,
                @"[In MESSAGE_HEADER] All Peer Content Caching and Retrieval:
                Hosted Cache Protocol [MS-PCHC] request messages use a common header,
                which consists of the following fields[Version, Type, Padding].");
        }
        /// <summary>
        /// Convert the messageHeaderStack struct defined in stack to adapter 
        /// </summary>
        /// <param name="messageHeaderStack">The messageHeaderStack message</param>
        /// <returns>Return the messageHeaderStack type defined in adapter</returns>
        private static MessageHeader ConvertFromStackForMsgHeader(MESSAGE_HEADER messageHeaderStack)
        {
            MessageHeader messageHeader;
            messageHeader.MajorVersion = messageHeaderStack.MajorVersion;
            messageHeader.MinorVersion = messageHeaderStack.MinorVersion;
            messageHeader.MsgType = ConvertFromStackForPCHCMsgType(messageHeaderStack.MsgType);
            messageHeader.Padding = messageHeaderStack.Padding;

            return messageHeader;
        }