Microsoft.Protocols.TestSuites.MS_OXNSPI.NspiMapiHttpAdapter.GetSpecialTable C# (CSharp) Method

GetSpecialTable() public method

The NspiGetSpecialTable method returns the rows of a special table to the client.
public GetSpecialTable ( uint flags, STAT &stat, uint &version, PropertyRowSet_r &rows ) : ErrorCodeValue
flags uint A DWORD value that contains a set of bit flags.
stat STAT A STAT block that describes a logical position in a specific address book container.
version uint A reference to a DWORD. On input, it holds the value of the version number of /// the address book hierarchy table that the client has. On output, it holds the version of the server's address book hierarchy table.
rows PropertyRowSet_r A PropertyRowSet_r structure. On return, it holds the rows for the table that the client is requesting.
return ErrorCodeValue
        public ErrorCodeValue GetSpecialTable(uint flags, ref STAT stat, ref uint version, out PropertyRowSet_r? rows)
        {
            ErrorCodeValue result;
            byte[] auxIn = new byte[] { };
            GetSpecialTableRequestBody getSpecialTableRequestBody = new GetSpecialTableRequestBody()
            {
                Flags = flags,
                HasState = true,
                State = stat,
                HasVersion = true,
                Version = version,
                AuxiliaryBuffer = auxIn,
                AuxiliaryBufferSize = (uint)auxIn.Length
            };

            ChunkedResponse chunkedResponse = this.SendAddressBookRequest(getSpecialTableRequestBody, RequestType.GetSpecialTable);
            GetSpecialTableResponseBody getSpecialTableResponseBody = GetSpecialTableResponseBody.Parse(chunkedResponse.ResponseBodyRawData);
            result = (ErrorCodeValue)getSpecialTableResponseBody.ErrorCode;
            if (getSpecialTableResponseBody.HasRows)
            {
                PropertyRowSet_r newRows = AdapterHelper.ParsePropertyRowSet_r(getSpecialTableResponseBody.RowCount.Value, getSpecialTableResponseBody.Rows);
                rows = newRows;
            }
            else
            {
                rows = null;
            }

            if (getSpecialTableResponseBody.HasVersion)
            {
                version = getSpecialTableResponseBody.Version.Value;
            }

            return result;
        }