A class indicates the GetTemplateInfo request type.
Inheritance: AddressBookRequestBodyBase
コード例 #1
0
        /// <summary>
        /// This method is used by the client to get information about a template that is used by the address book.
        /// </summary>
        /// <param name="getTemplateInfoRequestBody">The GetTemplateInfo request type request body.</param>
        /// <returns>The response body of the GetTemplateInfo request type.</returns>
        public GetTemplateInfoResponseBody GetTemplateInfo(GetTemplateInfoRequestBody getTemplateInfoRequestBody)
        {
            CommonResponse commonResponse = this.SendAddressBookRequest(getTemplateInfoRequestBody, RequestType.GetTemplateInfo);
            GetTemplateInfoResponseBody getTemplateInfoResponseBody = GetTemplateInfoResponseBody.Parse(commonResponse.ResponseBodyRawData);

            this.VerifyGetTemplateInfoResponseBody(getTemplateInfoResponseBody);

            return(getTemplateInfoResponseBody);
        }
        /// <summary>
        /// Build the GetTemplateInfo request body.
        /// </summary>
        /// <param name="flags">A set of bit flags that specify options to the server.</param>
        /// <param name="displayType">An unsigned integer that specifies the display type of the template for which information is requested.</param>
        /// <param name="hasTemplateDn">A Boolean value indicating whether the TemplateDN field is present.</param>
        /// <param name="templateDn">A string that specifies the distinguished name of the template requested.</param>
        /// <param name="codePage">An unsigned integer that specifies the code page of template for which information is requested.</param>
        /// <param name="locateId">An unsigned integer that specifies the language code identifier(LCID) of the template for which information is requested.</param>
        /// <returns>The GetTemplateInfo request body.</returns>
        private GetTemplateInfoRequestBody BuildGetTemplateInfoRequestBody(uint flags, uint displayType, bool hasTemplateDn, string templateDn, uint codePage, uint locateId)
        {
            byte[] auxIn = new byte[] { };
            GetTemplateInfoRequestBody getTemplateInfoRequestBody = new GetTemplateInfoRequestBody()
            {
                Flags = flags,
                DisplayType = displayType,
                HasTemplateDn = hasTemplateDn,
                TemplateDn = templateDn,
                CodePage = codePage,
                LocaleId = locateId,
                AuxiliaryBuffer = auxIn,
                AuxiliaryBufferSize = (uint)auxIn.Length
            };

            return getTemplateInfoRequestBody;
        }
コード例 #3
0
        /// <summary>
        /// This method is used by the client to get information about a template that is used by the address book.
        /// </summary>
        /// <param name="getTemplateInfoRequestBody">The GetTemplateInfo request type request body.</param>
        /// <returns>The response body of the GetTemplateInfo request type.</returns>
        public GetTemplateInfoResponseBody GetTemplateInfo(GetTemplateInfoRequestBody getTemplateInfoRequestBody)
        {
            CommonResponse commonResponse = this.SendAddressBookRequest(getTemplateInfoRequestBody, RequestType.GetTemplateInfo);
            GetTemplateInfoResponseBody getTemplateInfoResponseBody = GetTemplateInfoResponseBody.Parse(commonResponse.ResponseBodyRawData);
            this.VerifyGetTemplateInfoResponseBody(getTemplateInfoResponseBody);

            return getTemplateInfoResponseBody;
        }