Click or drag to resize

IExcludedContentManagerDelete Method

Delete one more excluded content items.

Namespace:  EdaIntegrationContract.NearDuplicate
Assembly:  EdaIntegration.Contract (in EdaIntegration.Contract.dll) Version: 7.6
Syntax
C#
void Delete(
	List<int> idsToDelete
)

Parameters

idsToDelete
Type: System.Collections.GenericListInt32
The list of unique identifiers of the excluded content items to be deleted.
Examples
This example demonstrates deleting an excluded content item.
C#
using EdaIntegrationContract;
using EdaIntegrationContract.Case;
using EdaIntegrationContract.NearDuplicate;

class Sample
{
    static void Main()
    {
        var edaIntegration = new EdaIntegration().ConnectToExplore();
        ICase edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");

         // Create an excluded content item
         string phrase = "This e-mail may contain information that is privileged or confidential.";
         IExcludedContentItem item = edaCase.NearDuplicates.Properties.ExcludedContent.Create(phrase);
         Console.WriteLine("Id: {0}", item.Id);
         Console.WriteLine("Phrase: {0}",item.Phrase);

         // Delete the excluded content item
         List<int> itemsToDelete = new List<int> { item.Id };
         edaCase.NearDuplicates.Properties.ExcludedContent.Delete(itemsToDelete);
         Console.WriteLine("Excluded content item deleted");

         // Attempting to find the excluded content item again will fail
         try
         {
           item = edaCase.NearDuplicates.Properties.ExcludedContent.ById(item.Id);
         }
         catch (EdaApiException ex)
         {
           Console.WriteLine("Exception: {0}", ex.Message);
         }
    }
}
/*
This example produces the following results:

Id: 1
Phrase: This e-mail may contain information that is privileged or confidential.
Excluded content item deleted
Exception: An excluded content item with the specified Id does not exist - 1 
 */
See Also