Click or drag to resize

ITagManagerByName Method

Retrieves a tag by its name.

Namespace:  EdaIntegrationContract.Tagging
Assembly:  EdaIntegration.Contract (in EdaIntegration.Contract.dll) Version: 7.6
Syntax
C#
ITag ByName(
	string tagName
)

Parameters

tagName
Type: SystemString
The name of the tag to find.

Return Value

Type: ITag
The tag matching the supplied tag name.
Exceptions
ExceptionCondition
EdaApiExceptionThrown if a tag cannot be found with the specified name.
Examples
The following example demonstrates retrieving a tag using its name.
C#
using EdaIntegrationContract;
using EdaIntegrationContract.Case;
using EdaIntegrationContract.Tagging;

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

        // Create a new tag
        ITag tag = edaCase.Tags.Create("Privileged");
        ITag itemById = edaCase.Tags.ByName(tag.Name);
        Console.WriteLine("Id: {0}", itemById.Id);
        Console.WriteLine("Name: {0}", itemById.Name);
    }
}
/*
This example produces the following results:

Id: 1
Name: Privileged
 */
See Also