示例#1
0
        /// <summary>
        /// Deletes an attachment from an item.
        /// </summary>
        /// <param name="attachmentIds">Contains the identifiers of the attachments to be deleted.</param>
        /// <returns>A response message for "DeleteAttachment" operation.</returns>
        protected DeleteAttachmentResponseType CallDeleteAttachmentOperation(params AttachmentIdType[] attachmentIds)
        {
            DeleteAttachmentType deleteAttachmentRequest = new DeleteAttachmentType()
            {
                AttachmentIds = attachmentIds
            };

            return(this.ATTAdapter.DeleteAttachment(deleteAttachmentRequest));
        }
        /// <summary>
        /// Deletes an attachment from an item in the server store.
        /// </summary>
        /// <param name="deleteAttachmentRequest">A DeleteAttachmentType complex type specifies a request message to delete an attachment on an item in the server database.</param>
        /// <returns>A DeleteAttachmentResponseType complex type specifies the response message that is returned by the DeleteAttachment operation.</returns>
        public DeleteAttachmentResponseType DeleteAttachment(DeleteAttachmentType deleteAttachmentRequest)
        {
            DeleteAttachmentResponseType deleteAttachmentResponse = this.exchangeServiceBinding.DeleteAttachment(deleteAttachmentRequest);

            Site.Assert.IsNotNull(deleteAttachmentResponse, "If the operation is successful, the response should not be null.");

            this.VerifySoapVersion();
            this.VerifyTransportType();
            this.VerifyServerVersionInfo(this.exchangeServiceBinding.IsSchemaValidated);
            this.VerifyDeleteAttachmentResponse(deleteAttachmentResponse, this.exchangeServiceBinding.IsSchemaValidated);
            return(deleteAttachmentResponse);
        }
 /// <remarks/>
 public void DeleteAttachmentAsync(DeleteAttachmentType DeleteAttachment1, object userState)
 {
     if ((this.DeleteAttachmentOperationCompleted == null))
     {
         this.DeleteAttachmentOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteAttachmentOperationCompleted);
     }
     this.InvokeAsync("DeleteAttachment", new object[] {
                 DeleteAttachment1}, this.DeleteAttachmentOperationCompleted, userState);
 }
 /// <remarks/>
 public void DeleteAttachmentAsync(DeleteAttachmentType DeleteAttachment1)
 {
     this.DeleteAttachmentAsync(DeleteAttachment1, null);
 }
 /// <remarks/>
 public System.IAsyncResult BeginDeleteAttachment(DeleteAttachmentType DeleteAttachment1, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("DeleteAttachment", new object[] {
                 DeleteAttachment1}, callback, asyncState);
 }