public ErrorCodeValue QueryRows(uint flags, ref STAT stat, uint tableCount, uint[] table, uint count, PropertyTagArray_r? propTags, out PropertyRowSet_r? rows)
{
ErrorCodeValue result;
QueryRowsRequestBody queryRowsRequestBody = new QueryRowsRequestBody();
LargePropTagArray propetyTags = new LargePropTagArray();
if (propTags != null)
{
propetyTags.PropertyTagCount = propTags.Value.CValues;
propetyTags.PropertyTags = new PropertyTag[propetyTags.PropertyTagCount];
for (int i = 0; i < propTags.Value.CValues; i++)
{
propetyTags.PropertyTags[i].PropertyId = (ushort)((propTags.Value.AulPropTag[i] & 0xFFFF0000) >> 16);
propetyTags.PropertyTags[i].PropertyType = (ushort)(propTags.Value.AulPropTag[i] & 0x0000FFFF);
}
queryRowsRequestBody.HasColumns = true;
queryRowsRequestBody.Columns = propetyTags;
}
queryRowsRequestBody.Flags = flags;
queryRowsRequestBody.HasState = true;
queryRowsRequestBody.State = stat;
queryRowsRequestBody.ExplicitTableCount = tableCount;
queryRowsRequestBody.ExplicitTable = table;
queryRowsRequestBody.RowCount = count;
byte[] auxIn = new byte[] { };
queryRowsRequestBody.AuxiliaryBuffer = auxIn;
queryRowsRequestBody.AuxiliaryBufferSize = (uint)auxIn.Length;
ChunkedResponse chunkedResponse = this.SendAddressBookRequest(queryRowsRequestBody, RequestType.QueryRows);
QueryRowsResponseBody queryRowsResponseBody = QueryRowsResponseBody.Parse(chunkedResponse.ResponseBodyRawData);
result = (ErrorCodeValue)queryRowsResponseBody.ErrorCode;
if (queryRowsResponseBody.RowCount != null)
{
PropertyRowSet_r newRows = AdapterHelper.ParsePropertyRowSet_r(queryRowsResponseBody.Columns.Value, queryRowsResponseBody.RowCount.Value, queryRowsResponseBody.RowData);
rows = newRows;
}
else
{
rows = null;
}
if (queryRowsResponseBody.HasState)
{
stat = queryRowsResponseBody.State.Value;
}
return result;
}