Compartilhar via


TermStore.GetTermSets Method (String, Int32)

This method retrieves a collection of all TermSets in this TermStore that the current user has permissions to read that have a matching TermSet name in the provided LCID

Namespace:  Microsoft.SharePoint.Taxonomy
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)

Syntax

'Declaration
Public Function GetTermSets ( _
    termSetName As String, _
    lcid As Integer _
) As TermSetCollection
'Usage
Dim instance As TermStore
Dim termSetName As String
Dim lcid As Integer
Dim returnValue As TermSetCollection

returnValue = instance.GetTermSets(termSetName, _
    lcid)
public TermSetCollection GetTermSets(
    string termSetName,
    int lcid
)

Parameters

  • termSetName
    Type: System.String

    The Name of the TermSet to be retrieved

  • lcid
    Type: System.Int32

    The local identifier for the language the TermSet name is in

Return Value

Type: Microsoft.SharePoint.Taxonomy.TermSetCollection
A collection of all TermSets in this TermStore that the current user has permissions to read that have a matching TermSet name in the provided LCID

Exceptions

Exception Condition
ArgumentNullException

The termSetName cannot be null or empty.

ArgumentException

The value of termSetName is invalid. It probably contains invalid characters or is too long.

Remarks

The termSetName cannot be null or empty, and must not exceed 255 characters in length. It also cannot contain any of the following illegal characters ; " < > | & tab The search is case-insensitive. To get the most accurate results it is recommended that any pending changes be committed to the database using CommitAll() prior to executing this search.

See Also

Reference

TermStore Class

TermStore Members

GetTermSets Overload

Microsoft.SharePoint.Taxonomy Namespace

Name

GetTermSets([])

GetTermSets([], Int32)