Microsoft.Protocols.TestSuites.MS_OXCPRPT.MS_OXCPRPTAdapter.RopSaveChangesAttachment C# (CSharp) Method

RopSaveChangesAttachment() private method

This ROP commits the changes made to an attachment.
private RopSaveChangesAttachment ( uint handle, bool needVerify ) : RopSaveChangesAttachmentResponse
handle uint The handle to operate.
needVerify bool Whether need to verify the response.
return Microsoft.Protocols.TestSuites.Common.RopSaveChangesAttachmentResponse
        private RopSaveChangesAttachmentResponse RopSaveChangesAttachment(uint handle, bool needVerify)
        {
            this.rawDataValue = null;
            this.responseValue = null;
            this.responseSOHsValue = null;

            RopSaveChangesAttachmentRequest saveChangesAttachmentRequest = new RopSaveChangesAttachmentRequest()
            {
                RopId = (byte)RopId.RopSaveChangesAttachment,
                LogonId = LogonId,
                InputHandleIndex = (byte)HandleIndex.FirstIndex,
                ResponseHandleIndex = (byte)HandleIndex.SecondIndex,

                // Set the SaveFlags flag to ForceSave, which indicates the client requests server to commit the changes. 
                SaveFlags = (byte)SaveFlags.ForceSave
            };

            this.responseSOHsValue = this.ProcessSingleRop(saveChangesAttachmentRequest, handle, ref this.responseValue, ref this.rawDataValue, RopResponseType.SuccessResponse);
            RopSaveChangesAttachmentResponse saveChangesAttachmentReponse = (RopSaveChangesAttachmentResponse)this.responseValue;
            if (needVerify)
            {
                this.Site.Assert.AreEqual((uint)RopResponseType.SuccessResponse, saveChangesAttachmentReponse.ReturnValue, string.Format("RopSaveChangesAttachment Failed! Error: 0x{0:X8}", saveChangesAttachmentReponse.ReturnValue));
            }

            return saveChangesAttachmentReponse;
        }
MS_OXCPRPTAdapter