/// <summary> /// Initializes a <see cref="TermSetInfo"/> instance from a taxonomy term set. /// </summary> /// <param name="termSet">The term set</param> /// <returns>The easily serializable <see cref="TermSetInfo"/> object</returns> public TermSetInfo CreateFromTermSet(TermSet termSet) { if (termSet == null) { throw new ArgumentNullException("termSet"); } TermGroupInfo groupInfo = this.CreateFromTermGroup(termSet.Group); return(new TermSetInfo(termSet.Id, this.GetTermSetLabelsForAllWorkingLanguages(termSet), groupInfo)); }
/// <summary> /// Initializes a new <see cref="ManagedNavigationInfo"/> instance /// </summary> /// <param name="termSet">Metadata about the term set driving navigation</param> /// <param name="termGroup">Metadata about the parent group of the term set driving navigation</param> /// <param name="language">The current language being configured</param> /// <param name="addNewPagesToNavigation">Whether new pages should be added to navigation term set automatically</param> /// <param name="createFriendlyUrlsForNewsPages">Whether catalog-type pages (such as news items) should use friendly URLs</param> /// <param name="preserveTaggingOnTermSet">Whether tagging with the term set should still be allowed</param> public ManagedNavigationInfo( TermSetInfo termSet, TermGroupInfo termGroup, CultureInfo language, bool addNewPagesToNavigation, bool createFriendlyUrlsForNewsPages, bool preserveTaggingOnTermSet) { this.PreserveTaggingOnTermSet = preserveTaggingOnTermSet; this.TermGroup = termGroup; this.AssociatedLanguage = language; this.TermSet = termSet; this.CreateFriendlyUrlsForNewsPages = createFriendlyUrlsForNewsPages; this.AddNewPagesToNavigation = addNewPagesToNavigation; }
/// <summary> /// Constructor for fully translated TermSetInfo belonging to specific farm-wide term group /// </summary> /// <param name="id">The term set's ID</param> /// <param name="labels">The term set's default labels</param> /// <param name="termGroup">The parent term group</param> public TermSetInfo(Guid id, IDictionary <CultureInfo, string> labels, TermGroupInfo termGroup) : this(id, labels) { this.Group = termGroup; // global farm term group }
/// <summary> /// Constructor for single language (CurrentUICulture) TermSetInfo belonging to specific farm-wide term group /// </summary> /// <param name="id">The term set's ID</param> /// <param name="label">The term set's default name</param> /// <param name="termGroup">The parent term group</param> public TermSetInfo(Guid id, string label, TermGroupInfo termGroup) : this(id, label) { this.Group = termGroup; // global farm term group }
/// <summary> /// Constructor for fully translated TermSetInfo belonging to specific farm-wide term group /// </summary> /// <param name="id">The term set's ID</param> /// <param name="labels">The term set's default labels</param> /// <param name="termGroup">The parent term group</param> public TermSetInfo(Guid id, IDictionary<CultureInfo, string> labels, TermGroupInfo termGroup) : this(id, labels) { this.Group = termGroup; // global farm term group }
/// <summary> /// Initializes a new <see cref="ManagedNavigationInfo"/> instance /// </summary> /// <param name="termSet">Metadata about the term set driving navigation</param> /// <param name="termGroup">Metadata about the parent group of the term set driving navigation</param> /// <param name="language">The current language being configured</param> public ManagedNavigationInfo(TermSetInfo termSet, TermGroupInfo termGroup, CultureInfo language) : this(termSet, termGroup, language, false, false, true) { }