Click or drag to resize

ExcludedContentManagerDelete Method

Delete one more excluded content items.

Namespace:  Law.EdaIntegration.NearDuplicate
Assembly:  Law.EdaIntegration (in Law.EdaIntegration.dll) Version: 7.3
Syntax
C#
public 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 Law.EdaIntegration;
using Law.EdaIntegration.Case;
using Law.EdaIntegration.NearDuplicate;

class Sample
{
    public static void Main()
    {
        string connectionString = @"Data Source=localhost;Initial Catalog=EDA_Management;Integrated Security=False;User ID=myUserId;Password=myPassword";
        EdaIntegration edaIntegration = new EdaIntegration();
        edaIntegration.InitializeEnvironment(connectionString);

        Case edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");

         // Create an excluded content item
         string phrase = "This e-mail may contain information that is privileged or confidential.";
         ExcludedContentItem 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