TermStore.GetTermSetsWithCustomProperty method (String, String, StringMatchOption, Int32)

Searches TermSet objects that have a custom property with the provided name and the provided value in a TermStore.

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

Syntax

'Declaration
Public Function GetTermSetsWithCustomProperty ( _
    customPropertyName As String, _
    customPropertyValue As String, _
    stringMatchOption As StringMatchOption, _
    resultCollectionSize As Integer _
) As TermSetCollection
'Usage
Dim instance As TermStore
Dim customPropertyName As String
Dim customPropertyValue As String
Dim stringMatchOption As StringMatchOption
Dim resultCollectionSize As Integer
Dim returnValue As TermSetCollection

returnValue = instance.GetTermSetsWithCustomProperty(customPropertyName, _
    customPropertyValue, stringMatchOption, _
    resultCollectionSize)
public TermSetCollection GetTermSetsWithCustomProperty(
    string customPropertyName,
    string customPropertyValue,
    StringMatchOption stringMatchOption,
    int resultCollectionSize
)

Parameters

  • customPropertyName
    Type: System.String

    The name of the property.

  • customPropertyValue
    Type: System.String

    The value of the property. If the value is null, the method only searches for the property name.

  • resultCollectionSize
    Type: System.Int32

    The maximum number of TermSet objects in the returned collection.

Return value

Type: Microsoft.SharePoint.Taxonomy.TermSetCollection
A collection of TermSet objects.

Remarks

The search results are returned directly from the TermStore. The TermStore may not be in sync with changes that have been made but not yet committed.

See also

Reference

TermStore class

TermStore members

GetTermSetsWithCustomProperty overload

Microsoft.SharePoint.Taxonomy namespace