Export (0) Print
Expand All

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 contain terms with labels matching or starting with each of the specified strings for a specified LCID.

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

public TermSetCollection GetTermSets(
	string[] requiredTermLabels,
	int lcid
)

Parameters

requiredTermLabels
Type: []

A set of labels to match against the Term.Labels of each TermSet

lcid
Type: System.Int32

The locale identifier for the language of the Term.Labels to perform that matching upon

Return value

Type: Microsoft.SharePoint.Taxonomy.TermSetCollection
A collection of all TermSets in this TermStore that the current user has permissions to read that contain terms with labels matching or starting with each of the specified strings for a specified LCID

ExceptionCondition
ArgumentNullException

The requiredTermLabels value cannot be null.

ArgumentNullException

The labels in requiredTermLabels cannot be null or empty.

ArgumentException

The value of one or more labels in requiredTermLabels is invalid. It probably contains invalid characters or is too long.

ArgumentOutOfRangeException

The lcid value must be one of the working languages in the current term store.

The value of the labels in requiredTermLabels cannot be null or empty, and must not exceed 255 characters in length. They also cannot contain any of the following illegal characters ; " < > | & tab The lcid value must be one of the working languages of the term store, specified by TermStore.Languages. The search is case-insensitive. A TermSet will be included in the returned collection if, for each label value in requiredTermLabels, the TermSet contains a Term with a label that matches or starts with the value for the specified lcid. There is no requirement for a single Term to contain all of the specified labels. 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.

Community Additions

Show:
© 2014 Microsoft