/// <summary> /// The NspiGetTemplateInfo method returns information about template objects. /// </summary> /// <param name="flags">A DWORD value that contains a set of bit flags.</param> /// <param name="type">A DWORD value. It specifies the display type of the template for which the information is requested.</param> /// <param name="dn">The value NULL or the DN of the template requested. The value is NULL-terminated.</param> /// <param name="codePage">A DWORD value. It specifies the code page of the template for which the information is requested.</param> /// <param name="localeID">A DWORD value. It specifies the LCID of the template for which the information is requested.</param> /// <param name="data">A reference to a PropertyRow_r value. On return, it contains the information requested.</param> /// <returns>Status of NSPI method.</returns> public ErrorCodeValue GetTemplateInfo(uint flags, uint type, string dn, uint codePage, uint localeID, out PropertyRow_r? data) { ErrorCodeValue result; byte[] auxIn = new byte[] { }; GetTemplateInfoRequestBody getTemplateInfoRequestBody = new GetTemplateInfoRequestBody() { Flags = flags, DisplayType = type, CodePage = codePage, LocaleId = localeID, AuxiliaryBuffer = auxIn, AuxiliaryBufferSize = (uint)auxIn.Length }; if (!string.IsNullOrEmpty(dn)) { getTemplateInfoRequestBody.HasTemplateDn = true; getTemplateInfoRequestBody.TemplateDn = dn; } ChunkedResponse chunkedResponse = this.SendAddressBookRequest(getTemplateInfoRequestBody, RequestType.GetTemplateInfo); GetTemplateInfoResponseBody getTemplateInfoResponseBody = GetTemplateInfoResponseBody.Parse(chunkedResponse.ResponseBodyRawData); result = (ErrorCodeValue)getTemplateInfoResponseBody.ErrorCode; if (getTemplateInfoResponseBody.HasRow) { PropertyRow_r propertyRow = AdapterHelper.ParsePropertyRow_r(getTemplateInfoResponseBody.Row.Value); data = propertyRow; } else { data = null; } return result; }