Microsoft.Protocols.TestSuites.MS_LISTSWS.MS_LISTSWSAdapter.DeleteAttachment C# (CSharp) Method

DeleteAttachment() public method

The DeleteAttachment operation is used to remove the attachment from the specified list item in the specified list.
public DeleteAttachment ( string listName, string listItemID, string url ) : void
listName string The name of the list in which the list item to delete existing attachment.
listItemID string The id of the list item from which the attachment will be deleted.
url string Absolute URL of the attachment that should be deleted.
return void
        public void DeleteAttachment(string listName, string listItemID, string url)
        {
            this.Site.Assert.IsNotNull(this.listsProxy, "The Proxy instance should not be NULL. If assert failed, the adapter need to be initialized");

            try
            {
                this.listsProxy.DeleteAttachment(listName, listItemID, url);

                // Verify the requirements of DeleteAttachment operation.
                this.VerifyDeleteAttachmentOperation();
            }
            catch (XmlSchemaValidationException exp)
            {
                // Log the errors and warnings
                this.LogSchemaValidationErrors();

                this.Site.Assert.Fail(exp.Message);
            }
            catch (SoapException)
            {
                this.VerifySoapExceptionFault();
                throw;
            }
        }
MS_LISTSWSAdapter