Click or drag to resize

IExcludedContentManagerById Method

Retrieves an excluded content item by its unique identifier.

Namespace:  EdaIntegrationContract.NearDuplicate
Assembly:  EdaIntegration.Contract (in EdaIntegration.Contract.dll) Version: 1.0
Syntax
C#
IExcludedContentItem ById(
	int id
)

Parameters

id
Type: SystemInt32
The unique identifier of the excluded content item to find.

Return Value

Type: IExcludedContentItem
The excluded content item with the supplied unique identifier.
Exceptions
ExceptionCondition
EdaApiExceptionThrown if an excluded content item cannot be found with the specified Id.
Examples
The following example demonstrates retrieving an excluded content item using its id.
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);

        // Retrieve the excluded content item and display it
        IExcludedContentItem itemById = edaCase.NearDuplicates.Properties.ExcludedContent.ById(item.Id);
        Console.WriteLine("Id: {0}", itemById.Id);
        Console.WriteLine("Phrase: {0}", itemById.Phrase);
    }
}       
/*
This example produces the following results:

Id: 1
Phrase: This e-mail may contain information that is privileged or confidential.      
 */
See Also