
Explanation/Reference:
Explanation:
*Box 1:
Example: //open context
using (ClientContext context = new ClientContext("http://sharepoint.local")) etc.
* Example (box 2-3)
private void CreateColorsTermSet(string siteUrl)
{
ClientContext clientContext = new ClientContext(siteUrl);
TaxonomySession taxonomySession = TaxonomySession.GetTaxonomySession(clientContext); clientContext.Load(taxonomySession,
ts => ts.TermStores.Include(
store => store.Name,
store => store.Groups.Include(
group => group.Name
)
)
);
clientContext.ExecuteQuery();
Box 4: GetTermSetsByName
SP.Taxonomy.TaxonomySession.getTermSetsByName Method
Gets all TermSet objects from all TermStore objects that have a name in the specified language.
Reference: Managed metadata and navigation in SharePoint 2013