Table of Contents

Interface ITermSet

Namespace
PnP.Core.Model.SharePoint
Assembly
PnP.Core.dll

Represents the set used in a term store. The set represents a unit which contains a collection of hierarchical terms. A group can contain multiple sets.

public interface ITermSet : IDataModel<ITermSet>, IDataModelParent, IDataModelWithContext, ISupportModules<ITermSet>, IDataModelGet<ITermSet>, IDataModelLoad<ITermSet>, IDataModelUpdate, IDataModelDelete, IQueryableDataModel
Inherited Members
Extension Methods

Properties

CreatedDateTime

Date and time of term set creation. Read-only.

DateTimeOffset CreatedDateTime { get; }

Property Value

DateTimeOffset

Description

Description giving details on the term set.

string Description { get; set; }

Property Value

string

Group

The parent group for this termset

ITermGroup Group { get; }

Property Value

ITermGroup

Id

The Unique ID of the term set.

string Id { get; }

Property Value

string

LocalizedNames

Name of the term set for each language.

ITermSetLocalizedNameCollection LocalizedNames { get; }

Property Value

ITermSetLocalizedNameCollection

Properties

Properties on this term set

ITermSetPropertyCollection Properties { get; }

Property Value

ITermSetPropertyCollection

Relations

Collection of terms relations

ITermRelationCollection Relations { get; }

Property Value

ITermRelationCollection

Terms

Collection of term in this term set Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

ITermCollection Terms { get; }

Property Value

ITermCollection

Methods

AddLocalizedName(string, string)

Adds a new localized termset name. Call update to persist this change.

void AddLocalizedName(string name, string languageTag)

Parameters

name string

Termset label

languageTag string

Language the label is in

AddProperty(string, string)

Adds a property to the term set's property collection. Call update to persist this change.

void AddProperty(string key, string value)

Parameters

key string

Property key

value string

Property value

AddPropertyAsync(string, string)

Adds a property to the term set's property collection. Call update to persist this change.

Task AddPropertyAsync(string key, string value)

Parameters

key string

Property key

value string

Property value

Returns

Task

GetTermsByCustomProperty(string, string, bool)

Gets all terms with this property.

IList<ITerm> GetTermsByCustomProperty(string key, string value, bool trimUnavailable = false)

Parameters

key string

Property key

value string

Property value

trimUnavailable bool

Trim unavailable terms

Returns

IList<ITerm>

GetTermsByCustomPropertyAsync(string, string, bool)

Gets all terms with this property.

Task<IList<ITerm>> GetTermsByCustomPropertyAsync(string key, string value, bool trimUnavailable = false)

Parameters

key string

Property key

value string

Property value

trimUnavailable bool

Trim unavailable terms

Returns

Task<IList<ITerm>>