/// <summary>
        /// Verify StringArray_r structure.
        /// </summary>
        /// <param name="stringArray">A StringArray_r value to be verified.</param>
        private void VerifystringArray_r(StringArray_r stringArray)
        {
            // Verify MS-OXNSPI requirement: MS-OXNSPI_R1567
            // Because the underlying parser code has parsed out the structure which contains it, this requirement can be captured directly.
            this.Site.CaptureRequirement(
                1567,
                @"[In stringArray_r Structure] [The type is defined as following:] typedef struct _stringArray_r {
                    [range(0,100000)] DWORD cValues;
                    [string, size_is(cValues)] char** lppszA;
                } stringArray_r;");

            // Add the debug information
            this.Site.Log.Add(
                LogEntryKind.Debug,
                "Verify MS-OXNSPI_R158: The value of cValues in StringArray_r Structure is {0} here.",
                stringArray.CValues);

            // Verify MS-OXNSPI requirement: MS-OXNSPI_R158
            this.Site.CaptureRequirementIfIsTrue(
                stringArray.CValues <= 100000,
                158,
                @"[In StringArray_r Structure] [cValues] This value MUST NOT exceed 100,000.");

            this.VerifyPropertyStructures();

            // Verify MS-OXNSPI requirement: MS-OXNSPI_R156
            // This test suite parses code according to this definition. So if the codes can reach here, this requirement can be captured directly.
            this.Site.CaptureRequirement(
                156,
                @"[In StringArray_r Structure] The StringArray_r structure encodes an array of references to 8-bit character strings.");

            // Verify MS-OXNSPI requirement: MS-OXNSPI_R157
            // This test suite parses code according to this definition. So if the codes can reach here, this requirement can be captured directly.
            this.Site.CaptureRequirement(
                157,
                @"[In StringArray_r Structure] cValues: The number of 8-bit character string references represented in the StringArray_r structure.");

            // Verify MS-OXNSPI requirement: MS-OXNSPI_R159
            // This test suite parses code according to this definition. So if the codes can reach here, this requirement can be captured directly.
            this.Site.CaptureRequirement(
                159,
                @"[In StringArray_r Structure] lppszA: The 8-bit character string references.");

            // Verify MS-OXNSPI requirement: MS-OXNSPI_R160
            // The parser code parses the strings based on the string that is ended with null. If all the codes can reach here, it illustrates that it is parsed correctly.
            this.Site.CaptureRequirement(
                160,
                @"[In StringArray_r Structure] [lppszA] The strings referred to are NULL-terminated.");
        }
        /// <summary>
        /// The NspiDNToMId method maps a set of DN to a set of Minimal Entry ID.
        /// </summary>
        /// <param name="reserved">A DWORD value reserved for future use. Ignored by the server.</param>
        /// <param name="names">A StringsArray_r value. It holds a list of strings that contain DNs.</param>
        /// <param name="mids">A PropertyTagArray_r value. On return, it holds a list of Minimal Entry IDs.</param>
        /// <returns>Status of NSPI method.</returns>
        public ErrorCodeValue DNToMId(uint reserved, StringsArray_r names, out PropertyTagArray_r? mids)
        {
            ErrorCodeValue result;
            byte[] auxIn = new byte[] { };
            StringArray_r nameArray = new StringArray_r();
            nameArray.CValues = names.CValues;
            nameArray.LppszA = names.LppszA;
            DNToMinIdRequestBody requestBodyOfdnToMId = new DNToMinIdRequestBody()
            {
                Reserved = reserved,
                HasNames = true,
                Names = nameArray,
                AuxiliaryBuffer = auxIn,
                AuxiliaryBufferSize = (uint)auxIn.Length
            };

            ChunkedResponse chunkedResponse = this.SendAddressBookRequest(requestBodyOfdnToMId, RequestType.DNToMId);
            DnToMinIdResponseBody distinguishedNameToMinIdResponseBody = DnToMinIdResponseBody.Parse(chunkedResponse.ResponseBodyRawData);
            result = (ErrorCodeValue)distinguishedNameToMinIdResponseBody.ErrorCode;
            if (distinguishedNameToMinIdResponseBody.HasMinimalIds)
            {
                PropertyTagArray_r propertyTagArray = AdapterHelper.ParsePropertyTagArray_r(distinguishedNameToMinIdResponseBody.MinimalIdCount.Value, distinguishedNameToMinIdResponseBody.MinimalIds);
                mids = propertyTagArray;
            }
            else
            {
                mids = null;
            }

            return result;
        }