IExcludedContentManagerDelete Method |
Namespace: EdaIntegrationContract.NearDuplicate
void Delete( List<int> idsToDelete )
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 */