Share via


TaxonomySession.GetTermsInDefaultLanguage method

Searches Label objects in the Microsoft.SharePoint.Client.Taxonomy.TermStore objects’ default language, and returns Term objects that are not scoped to a Site object from all TermSet objects, in all TermStore objects that contain a Label object that matches the provided string.

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

Syntax

'Declaration
Public Function GetTermsInDefaultLanguage ( _
    termLabel As String, _
    defaultLabelOnly As Boolean, _
    stringMatchOption As StringMatchOption, _
    resultCollectionSize As Integer, _
    trimUnavailable As Boolean, _
    trimDeprecated As Boolean _
) As TermCollection
'Usage
Dim instance As TaxonomySession
Dim termLabel As String
Dim defaultLabelOnly As Boolean
Dim stringMatchOption As StringMatchOption
Dim resultCollectionSize As Integer
Dim trimUnavailable As Boolean
Dim trimDeprecated As Boolean
Dim returnValue As TermCollection

returnValue = instance.GetTermsInDefaultLanguage(termLabel, _
    defaultLabelOnly, stringMatchOption, _
    resultCollectionSize, trimUnavailable, _
    trimDeprecated)
public TermCollection GetTermsInDefaultLanguage(
    string termLabel,
    bool defaultLabelOnly,
    StringMatchOption stringMatchOption,
    int resultCollectionSize,
    bool trimUnavailable,
    bool trimDeprecated
)

Parameters

  • defaultLabelOnly
    Type: System.Boolean

    yes if it only searches default Label objects. no if it searches all Label objects.

  • resultCollectionSize
    Type: System.Int32

    The maximum number of Term objects to return from each TermStore object.

  • trimUnavailable
    Type: System.Boolean

    yes if it trims the unavailable Term objects from the result collection; no if it includes the unavailable Term objects in the result collection.

  • trimDeprecated
    Type: System.Boolean

    yes if it trims the deprecated Term objects from the result collection; no if it includes the deprecated Term objects in the result collection.

Return value

Type: Microsoft.SharePoint.Client.Taxonomy.TermCollection
Returns a TermCollection object.

See also

Reference

TaxonomySession class

TaxonomySession members

Microsoft.SharePoint.Client.Taxonomy namespace