MSHCComponent Class
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.
Definition
Namespace: Sandcastle.Tools.BuildComponents
Assembly: Sandcastle.Tools.BuildComponents (in Sandcastle.Tools.BuildComponents.dll) Version: 2026.1.20.0
Assembly: Sandcastle.Tools.BuildComponents (in Sandcastle.Tools.BuildComponents.dll) Version: 2026.1.20.0
C#
public class MSHCComponent : BuildComponentCoreVB
Public Class MSHCComponent
Inherits BuildComponentCoreC++
public ref class MSHCComponent : public BuildComponentCoreF#
type MSHCComponent =
class
inherit BuildComponentCore
end- Inheritance
- Object BuildComponentCore MSHCComponent
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.
Example
Example Component Configuration
<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>Example toc.xml File
<?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>Constructors
| MSHCComponent | 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 |
This abstract method must be overridden to apply the build component's changes to the specified
document.
(Overrides BuildComponentCoreApply(XmlDocument, String)) |
| Dispose |
This implements the Dispose() interface to properly dispose of the build component.
(Inherited from BuildComponentCore) |
| Dispose(Boolean) |
This can be overridden by derived classes to add their own disposal code if necessary.
(Inherited from BuildComponentCore) |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Finalize |
This handles garbage collection to ensure proper disposal of the build component if not done
explicitly with Dispose.
(Inherited from BuildComponentCore) |
| GetHashCode | Serves as the default hash function. (Inherited from Object) |
| GetType | Gets the Type of the current instance. (Inherited from Object) |
| Initialize |
This abstract method must be overridden to initialize the component
(Overrides BuildComponentCoreInitialize(XPathNavigator)) |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
| OnComponentEvent |
This can be used to raise the ComponentEvent
event with the specified event arguments.
(Inherited from BuildComponentCore) |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
| WriteMessage(MessageLevel, String, Object) |
This can be used to report a message
(Inherited from BuildComponentCore) |
| WriteMessage(String, MessageLevel, String, Object) |
This can be used to report a message for a specific topic ID
(Inherited from BuildComponentCore) |