TermStore.GetTermSets method (String[])

Gets a collection of all TermSet objects in this TaxonomyTermStore object that the current user has permissions to read that contain terms with labels matching or starting with each of the specified strings.

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

public TermSetCollection GetTermSets(
	string[] requiredTermLabels
)

Parameters

requiredTermLabels
Type: []

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

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.

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.

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 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. 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.

Show: