Click or drag to resize

TagManagerCreate Method

Creates a new tag for a case.

Namespace:  Law.EdaIntegration.Tagging
Assembly:  Law.EdaIntegration (in Law.EdaIntegration.dll) Version: 7.3
Syntax
C#
public Tag Create(
	string tagName
)

Parameters

tagName
Type: SystemString
The name of the tag to be created.

Return Value

Type: Tag
The tag object created.
Remarks
Tags with duplicate names are not allowed to exist in a case.
Examples
The following example demonstrates how to create a new tag.
C#
using Law.EdaIntegration;
using Law.EdaIntegration.Case;
using Law.EdaIntegration.Tagging;

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 a tag
        Tag tag = edaCase.Tags.Create("Privileged");
        Console.WriteLine("Id: {0}", tag.Id);
        Console.WriteLine("Name: {0}",tag.Name);
    }
}
/*
This example produces the following results:

Id: 1
Name: Privileged
 */
See Also