다음을 통해 공유


TaxonomySession.GetTerms Method (String, Boolean)

Gets Term objects from all TermSet objects, which are not scoped to a SPSite object, from all TermStore objects with a Label matching the string provided.

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

Syntax

'Declaration
Public Function GetTerms ( _
    termLabel As String, _
    trimUnavailable As Boolean _
) As TermCollection
'Usage
Dim instance As TaxonomySession
Dim termLabel As String
Dim trimUnavailable As Boolean
Dim returnValue As TermCollection

returnValue = instance.GetTerms(termLabel, _
    trimUnavailable)
public TermCollection GetTerms(
    string termLabel,
    bool trimUnavailable
)

Parameters

  • trimUnavailable
    Type: System.Boolean

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

Return Value

Type: Microsoft.SharePoint.Taxonomy.TermCollection
A sorted collection of Term objects

Remarks

This method searches all Label objects in all working languages and returns the top 100 Term objects from each TermStore object and combines the results into one sorted collection.The search results are returned directly from the TermStore. It may not be synchronized with changes that have been made but that have not yet been committed. For the best results, call the CommitAll method or call the RollbackAll method before you call this method.

See Also

Reference

TaxonomySession Class

TaxonomySession Members

GetTerms Overload

Microsoft.SharePoint.Taxonomy Namespace

Term

Labels