Table of Contents

MSHCComponent Class

Definition

Namespace
Sandcastle.Tools.BuildComponents
Assembly
Sandcastle.Tools.BuildComponents.dll

This class is a modified version of the original MSHCComponent that is used to add MS Help Viewer meta data to the topics. This version allows the inclusion of a sortOrder attribute on the table of contents file elements. This allows the sort order of the elements to be defined to set the proper placement of the TOC entries when parented to an entry outside of the help file and to parent the API content within a conceptual content folder.

public class MSHCComponent : BuildComponentCore, IDisposable
Inheritance
MSHCComponent
Implements

Examples

<component id="Microsoft Help Viewer Metadata Component">
  <data self-branded="true" topic-version="100" toc-file="toc.xml"
  toc-parent="" toc-parent-version="100" />
</component>
<?xml version="1.0" encoding="utf-8"?>
<topics>
  <!-- Sort our content below that of the parent node's existing sub-topics -->
  <topic id="d4648875-d41a-783b-d5f4-638df39ee413" file="d4648875-d41a-783b-d5f4-638df39ee413" sortOrder="100">
    <topic id="57f7aedc-17d3-4547-bdf9-5b468a08a1bc" file="57f7aedc-17d3-4547-bdf9-5b468a08a1bc" />
    <topic id="0e6bbd29-775a-8deb-c4f5-5b1e63349ef1" file="0e6bbd29-775a-8deb-c4f5-5b1e63349ef1" />
    <topic id="fcdfafc4-7625-f407-d8e9-ec006944e1d7" file="fcdfafc4-7625-f407-d8e9-ec006944e1d7" />
    <!-- API content (7 namespaces, merged later) goes here and this topic follows it -->
    <topic id="ce37cf86-fd95-49fc-b048-ba7d25d68d87" file="ce37cf86-fd95-49fc-b048-ba7d25d68d87" sortOrder="10">
  </topic>
  .
  .
  .
</topics>

Remarks

The sortOrder attributes are optional. If not found, standard ordering is applied starting from zero. If a sortOrder attribute is found, numbering starts from that value for the associated topic and increments by one for all subsequent topics until another sortOrder attribute is encountered or the end of the group is reached.

Constructors

MSHCComponent(IBuildAssembler)

Constructor

Properties

BuildAssembler

This read-only property returns a reference to the build assembler instance using the component

(Inherited from BuildComponentCore)
GroupId

This is used to set an optional group ID for use with component events

(Inherited from BuildComponentCore)

Methods

Apply(XmlDocument, string)

This abstract method must be overridden to apply the build component's changes to the specified document.

Dispose()

This implements the Dispose() interface to properly dispose of the build component.

(Inherited from BuildComponentCore)
Initialize(XPathNavigator)

This abstract method must be overridden to initialize the component