/// <summary> /// This method is used by the client to search for and set the logical position in a specific table to the first entry greater than or equal to a specified value. /// </summary> /// <param name="seekEntriesRequestBody">The SeekEntries request type request body.</param> /// <returns>The response body of SeekEntries request type.</returns> public SeekEntriesResponseBody SeekEntries(SeekEntriesRequestBody seekEntriesRequestBody) { CommonResponse commonResponse = this.SendAddressBookRequest(seekEntriesRequestBody, RequestType.SeekEntries); SeekEntriesResponseBody seekEntriesResponseBody = SeekEntriesResponseBody.Parse(commonResponse.ResponseBodyRawData); this.VerifySeekEntriesResponseBody(seekEntriesResponseBody); if (seekEntriesResponseBody.HasColumnsAndRows) { foreach (AddressBookPropertyRow row in seekEntriesResponseBody.RowData) { this.VerifyAddressBookPropertyRowStructure(row); } this.VerifyLargePropertyTagArrayStructure(seekEntriesResponseBody.Columns.Value); } return(seekEntriesResponseBody); }
/// <summary> /// Build the GetMatches request body. /// </summary> /// <param name="hasState">A Boolean value that specifies whether the State field is present.</param> /// <param name="state">A STAT structure that specifies the state of a specific address book container. </param> /// <param name="hasTarget">A Boolean value that specifies whether the Target field is present.</param> /// <param name="target">A PropertyValue_r structure that specifies the property value being sought.</param> /// <param name="hasExplicitTable">A Boolean value that specifies whether the ExplicitTableCount and ExplicitTable fields are present.</param> /// <param name="explicitableCount">An unsigned integer that specifies the number of structures present in the ExplicitTable field.</param> /// <param name="explicitTable">An array of unsigned integer that constitute an Explicit Table.</param> /// <param name="hasColumns">A Boolean value that specifies whether the Columns field is present.</param> /// <param name="columns">A LargePropTagArray structure that specifies the columns that the client is requesting.</param> /// <returns>Return an instance of SeekEntriesRequestBody class.</returns> private SeekEntriesRequestBody BuildSeekEntriesRequestBody(bool hasState, STAT state, bool hasTarget, PropertyValue_r target, bool hasExplicitTable, uint explicitableCount, uint[] explicitTable, bool hasColumns, LargePropertyTagArray columns) { SeekEntriesRequestBody requestBody = new SeekEntriesRequestBody(); // Reserved. The client MUST set this field to 0x00000000 and the server MUST ignore this field. requestBody.Reserved = 0x00000000; requestBody.HasState = hasState; if (hasState) { requestBody.State = state; } requestBody.HasTarget = hasTarget; if (hasTarget) { requestBody.Target = target; } requestBody.HasExplicitTable = hasExplicitTable; if (hasExplicitTable) { requestBody.ExplicitableCount = explicitableCount; requestBody.ExplicitTable = explicitTable; } requestBody.HasColumns = hasColumns; if (hasColumns) { requestBody.Columns = columns; } requestBody.AuxiliaryBufferSize = 0; requestBody.AuxiliaryBuffer = new byte[] { }; return requestBody; }
/// <summary> /// This method is used by the client to search for and set the logical position in a specific table to the first entry greater than or equal to a specified value. /// </summary> /// <param name="seekEntriesRequestBody">The SeekEntries request type request body.</param> /// <returns>The response body of SeekEntries request type.</returns> public SeekEntriesResponseBody SeekEntries(SeekEntriesRequestBody seekEntriesRequestBody) { CommonResponse commonResponse = this.SendAddressBookRequest(seekEntriesRequestBody, RequestType.SeekEntries); SeekEntriesResponseBody seekEntriesResponseBody = SeekEntriesResponseBody.Parse(commonResponse.ResponseBodyRawData); this.VerifySeekEntriesResponseBody(seekEntriesResponseBody); if (seekEntriesResponseBody.HasColumnsAndRows) { foreach (AddressBookPropertyRow row in seekEntriesResponseBody.RowData) { this.VerifyAddressBookPropertyRowStructure(row); } this.VerifyLargePropertyTagArrayStructure(seekEntriesResponseBody.Columns.Value); } return seekEntriesResponseBody; }