Microsoft.Protocols.TestSuites.MS_OXCMAPIHTTP.S02_RequestTypesForAddressBookServerEndpoint.BuildGetSpecialTableRequestBody C# (CSharp) Method

BuildGetSpecialTableRequestBody() private method

Build the GetSpecialTable request body.
private BuildGetSpecialTableRequestBody ( uint flags, bool hasState, STAT state, bool hasVersion, uint version ) : GetSpecialTableRequestBody
flags uint A set of bit flags that specify options to the server.
hasState bool A Boolean value that specifies whether the State field is present.
state STAT A STAT structure that specifies the state of a specific address book container.
hasVersion bool A Boolean value that specifies whether the Version field is present.
version uint A unsigned integer that specifies the version number of the address book hierarchy table that the client has.
return GetSpecialTableRequestBody
        private GetSpecialTableRequestBody BuildGetSpecialTableRequestBody(uint flags, bool hasState, STAT state, bool hasVersion, uint version)
        {
            byte[] auxIn = new byte[] { };
            GetSpecialTableRequestBody getSpecialTableRequestBody = new GetSpecialTableRequestBody()
            {
                Flags = flags,
                HasState = hasState,
                HasVersion = hasVersion,
                AuxiliaryBuffer = auxIn,
                AuxiliaryBufferSize = (uint)auxIn.Length
            };

            if (hasState)
            {
                getSpecialTableRequestBody.State = state;
            }

            if (hasVersion)
            {
                getSpecialTableRequestBody.Version = version;
            }

            return getSpecialTableRequestBody;
        }