A class indicates the response body of ModLinkAtt request
상속: AddressBookResponseBodyBase
        /// <summary>
        /// This method is used by the client to modify a specific property of a row in the address book.
        /// </summary>
        /// <param name="modLinkAttRequestBody">The ModLinkAtt request type request body.</param>
        /// <returns>The response body of the ModLinkAtt request type.</returns>
        public ModLinkAttResponseBody ModLinkAtt(ModLinkAttRequestBody modLinkAttRequestBody)
        {
            CommonResponse         commonResponse         = this.SendAddressBookRequest(modLinkAttRequestBody, RequestType.ModLinkAtt);
            ModLinkAttResponseBody modLinkAttResponseBody = ModLinkAttResponseBody.Parse(commonResponse.ResponseBodyRawData);

            this.VerifyModLinkAttResponseBody(modLinkAttResponseBody);

            return(modLinkAttResponseBody);
        }
 /// <summary>
 /// Parse the ModLinkAtt request type response body.
 /// </summary>
 /// <param name="rawData">The raw data of response.</param>
 /// <returns>The ModLinkAtt request type response body.</returns>
 public static ModLinkAttResponseBody Parse(byte[] rawData)
 {
     ModLinkAttResponseBody responseBody = new ModLinkAttResponseBody();
     int index = 0;
     responseBody.StatusCode = BitConverter.ToUInt32(rawData, index);
     index += 4;
     responseBody.ErrorCode = BitConverter.ToUInt32(rawData, index);
     index += 4;
     responseBody.AuxiliaryBufferSize = BitConverter.ToUInt32(rawData, index);
     index += 4;
     responseBody.AuxiliaryBuffer = new byte[responseBody.AuxiliaryBufferSize];
     Array.Copy(rawData, index, responseBody.AuxiliaryBuffer, 0, responseBody.AuxiliaryBufferSize);
     return responseBody;
 }
        /// <summary>
        /// Parse the ModLinkAtt request type response body.
        /// </summary>
        /// <param name="rawData">The raw data of response.</param>
        /// <returns>The ModLinkAtt request type response body.</returns>
        public static ModLinkAttResponseBody Parse(byte[] rawData)
        {
            ModLinkAttResponseBody responseBody = new ModLinkAttResponseBody();
            int index = 0;

            responseBody.StatusCode = BitConverter.ToUInt32(rawData, index);
            index += 4;
            responseBody.ErrorCode = BitConverter.ToUInt32(rawData, index);
            index += 4;
            responseBody.AuxiliaryBufferSize = BitConverter.ToUInt32(rawData, index);
            index += 4;
            responseBody.AuxiliaryBuffer = new byte[responseBody.AuxiliaryBufferSize];
            Array.Copy(rawData, index, responseBody.AuxiliaryBuffer, 0, responseBody.AuxiliaryBufferSize);
            return(responseBody);
        }
예제 #4
0
        /// <summary>
        ///  Verify the ModLinkAtt response body related requirements.
        /// </summary>
        /// <param name="modLinkAttResponseBody">The ModLinkAtt response body to be verified.</param>
        private void VerifyModLinkAttResponseBody(ModLinkAttResponseBody modLinkAttResponseBody)
        {
            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R757");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R757
            this.Site.CaptureRequirementIfIsInstanceOfType(
                modLinkAttResponseBody.StatusCode,
                typeof(uint),
                757,
                @"[In ModLinkAtt Request Type Success Response Body] StatusCode (4 bytes): An unsigned integer that specifies the status of the request.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R758");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R758
            this.Site.CaptureRequirementIfAreEqual<uint>(
                0,
                modLinkAttResponseBody.StatusCode,
                758,
                @"[In ModLinkAtt Request Type Success Response Body] [StatusCode] This field MUST be set to 0x00000000.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R759");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R759
            this.Site.CaptureRequirementIfIsInstanceOfType(
                modLinkAttResponseBody.ErrorCode,
                typeof(uint),
                759,
                @"[In ModLinkAtt Request Type Success Response Body] ErrorCode (4 bytes): An unsigned integer that specifies the return status of the operation.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R760");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R760
            this.Site.CaptureRequirementIfIsInstanceOfType(
                modLinkAttResponseBody.AuxiliaryBufferSize,
                typeof(uint),
                760,
                @"[In ModLinkAtt Request Type Success Response Body] AuxiliaryBufferSize (4 bytes): An unsigned integer that specifies the size, in bytes, of the AuxiliaryBuffer field.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R761");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R761
            this.Site.CaptureRequirementIfIsInstanceOfType(
                modLinkAttResponseBody.AuxiliaryBuffer,
                typeof(byte[]),
                761,
                @"[In ModLinkAtt Request Type Success Response Body] AuxiliaryBuffer (variable): An array of bytes that constitute the auxiliary payload data returned from the server.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R762");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R762
            this.Site.CaptureRequirementIfAreEqual<uint>(
                modLinkAttResponseBody.AuxiliaryBufferSize,
                (uint)modLinkAttResponseBody.AuxiliaryBuffer.Length,
                762,
                @"[In ModLinkAtt Request Type Success Response Body] [AuxiliaryBuffer] The size of this field, in bytes, is specified by the AuxiliaryBufferSize field.");
        }