Click or drag to resize
Sandcastle Help File BuilderMultiFormatOutputComponent Class
This build component is used to execute one or more sets of build components each based on a specific help file output format.
Inheritance Hierarchy
SystemObject
  Sandcastle.Core.BuildAssembler.BuildComponentBuildComponentCore
    SandcastleBuilder.ComponentsMultiFormatOutputComponent

Namespace: SandcastleBuilder.Components
Assembly: SandcastleBuilder.Components (in SandcastleBuilder.Components.dll) Version: 2014.11.22.0
Syntax
public class MultiFormatOutputComponent : BuildComponentCore

The MultiFormatOutputComponent type exposes the following members.

Constructors
  NameDescription
Protected methodMultiFormatOutputComponent
Constructor
Top
Methods
  NameDescription
Public methodApply
This is implemented to execute each set of components for the requested output formats.
(Overrides BuildComponentCoreApply(XmlDocument, String).)
Public methodDispose
This implements the Dispose() interface to properly dispose of the build component.
(Inherited from BuildComponentCore.)
Protected methodDispose(Boolean)
This can be overridden by derived classes to add their own disposal code if necessary.
(Overrides BuildComponentCoreDispose(Boolean).)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
This handles garbage collection to ensure proper disposal of the build component if not done explicitly with Dispose.
(Inherited from BuildComponentCore.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitialize
This abstract method must be overridden to initialize the component
(Overrides BuildComponentCoreInitialize(XPathNavigator).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnComponentEvent
This can be used to raise the ComponentEvent event with the specified event arguments.
(Inherited from BuildComponentCore.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteMessage(MessageLevel, String, Object)
This can be used to report a message
(Inherited from BuildComponentCore.)
Public methodWriteMessage(String, MessageLevel, String, Object)
This can be used to report a message for a specific topic ID
(Inherited from BuildComponentCore.)
Top
Properties
  NameDescription
Public propertyBuildAssembler
This read-only property returns a reference to the build assembler instance using the component
(Inherited from BuildComponentCore.)
Public propertyIsThreadSafe
Reserved for future use
(Inherited from BuildComponentCore.)
Top
Remarks
One or more components can be executed based on a specified list of one or more help file output formats. Only the components related to the requested set of format types will be executed.
Examples
Example Configuration
<!-- Multi-format output component.  This must wrap the component set
     unique to each output file format. -->
<component id="Multi-format Output Component">
  <!-- This defines the formats to generate -->
  <build formats="{@HelpFileFormat}" />

  <!-- This defines the set of components for HTML Help 1 files -->
  <helpOutput format="HtmlHelp1">
    <!-- Add additional header resources -->
    <component id="Additional Header Resources Component">
      <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
      <stylesheet name="../styles/branding-Help1.css" />
    </component>

    <!-- Resolve shared content -->
    <component id="Shared Content Component">
      <content file="{@ResourceItemsFolder}shared_content.xml" />
      <content file="{@ResourceItemsFolder}reference_content.xml" />
      <content file="{@ResourceItemsFolder}syntax_content.xml" />
      <!-- These must be last in order to override other elements! -->
      <content file="SHFBContent.xml" />
      {@ResourceItemFiles}
    </component>

    <!-- Resolve conceptual links -->
    <component id="Resolve Conceptual Links Component">
      <showBrokenLinkText value="true" />
      <targets base="xmlComp" type="Local" />
    </component>

    <!-- Resolve reference links -->
    <component id="Resolve Reference Links Component">
      <locale value="{@Locale}" />
      <linkTarget value="{@SdkLinkTarget}" />
      <msdnContentIdCache path="{@LocalDataFolder}Cache\MsdnContentId.cache" />
      <targets base="{@SHFBFolder}Data\Reflection" recurse="true" files="*.xml"
        type="{@HtmlSdkLinkType}" id="FrameworkTargets">
        {@ReferenceLinkNamespaceFiles}
      </targets>
      <targets files="reflection.xml" type="Local" id="ProjectTargets" />
    </component>

    <!-- Convert language-specific text spans to script elements -->
    <component id="Language-Specific Text Component" />

    <!-- Save the result -->
    <component id="Save Component">
      <save base="Output\HtmlHelp1\html" path="concat(/html/head/meta[@name='file']/@content,'.htm')"
        indent="{@IndentHtml}" omit-xml-declaration="true" add-xhtml-namespace="false" outputMethod="html" />
    </component>
  </helpOutput>

  <!-- This defines the set of components for MS Help 2 files -->
  <helpOutput format="MSHelp2">
    <!-- Add additional header resources -->
    <component id="Additional Header Resources Component">
      <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
      <stylesheet name="../styles/branding-Help2.css" />
    </component>

    <!-- Resolve shared content -->
    <component id="Shared Content Component">
      <content file="{@ResourceItemsFolder}shared_content.xml" />
      <content file="{@ResourceItemsFolder}reference_content.xml" />
      <content file="{@ResourceItemsFolder}syntax_content.xml" />
      <!-- These must be last in order to override other elements! -->
      <content file="SHFBContent.xml" />
      {@ResourceItemFiles}
    </component>

    <!-- Insert additional MS Help 2 attributes -->
    <component id="Help 2 Help Attribute Component">
      {@HelpAttributes}
    </component>

    <!-- Resolve conceptual links -->
    <component id="Resolve Conceptual Links Component">
      <showBrokenLinkText value="true" />
      <targets base="xmlComp" type="Index" />
    </component>

    <!-- Resolve reference links -->
    <component id="Resolve Reference Links Component">
      <locale value="{@Locale}" />
      <linkTarget value="{@SdkLinkTarget}" />
      <msdnContentIdCache path="{@LocalDataFolder}Cache\MsdnContentId.cache" />
      <targets base="{@SHFBFolder}Data\Reflection" recurse="true" files="*.xml"
        type="{@MSHelp2SdkLinkType}" id="FrameworkTargets">
        {@ReferenceLinkNamespaceFiles}
      </targets>
      <targets files="reflection.xml" type="Index" id="ProjectTargets" />
    </component>

    <!-- Convert language-specific text spans to script elements -->
    <component id="Language-Specific Text Component" />

    <!-- Save the result -->
    <component id="Save Component">
      <save base="Output\MSHelp2\html" path="concat(/html/head/meta[@name='file']/@content,'.htm')"
        indent="{@IndentHtml}" omit-xml-declaration="true" add-xhtml-namespace="false" outputMethod="html" />
    </component>
  </helpOutput>

  <!-- This defines the set of components for MS Help Viewer files -->
  <helpOutput format="MSHelpViewer">
    <!-- Add additional header resources -->
    <component id="Additional Header Resources Component">
      <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
      <stylesheet name="styles/branding-HelpViewer.css" />
    </component>

    <!-- Resolve shared content -->
    <component id="Shared Content Component">
      <content file="{@ResourceItemsFolder}shared_content.xml" />
      <!-- Override the paths for MS Help Viewer -->
      <content file="{@ResourceItemsFolder}shared_content_mshc.xml" />
      <content file="{@ResourceItemsFolder}reference_content.xml" />
      <content file="{@ResourceItemsFolder}syntax_content.xml" />
      <!-- These must be last in order to override other elements! -->
      <content file="SHFBContent.xml" />
      {@ResourceItemFiles}
    </component>

    <!-- Resolve conceptual links -->
    <component id="Resolve Conceptual Links Component">
      <showBrokenLinkText value="true" />
      <targets base="xmlComp" type="Id"/>
    </component>

    <!-- Resolve reference links -->
    <component id="Resolve Reference Links Component">
      <locale value="{@Locale}" />
      <linkTarget value="{@SdkLinkTarget}" />
      <msdnContentIdCache path="{@LocalDataFolder}Cache\MsdnContentId.cache" />
      <targets base="{@SHFBFolder}Data\Reflection" recurse="true" files="*.xml"
        type="{@MSHelpViewerSdkLinkType}" id="FrameworkTargets">
        {@ReferenceLinkNamespaceFiles}
      </targets>
      <targets files="reflection.xml" type="Id" id="ProjectTargets" />
    </component>

    <!-- Add MSHC metadata -->
    <component id="Microsoft Help Viewer Metadata Component">
      <data topic-version="{@TopicVersion}" toc-file="toc.xml"
        toc-parent="{@ApiTocParentId}" toc-parent-version="{@TocParentVersion}" locale="{@Locale}" />
    </component>

    <!-- Convert language-specific text spans to script elements -->
    <component id="Language-Specific Text Component" />

    <!-- Save the result -->
    <component id="Save Component">
      <save base="Output\MSHelpViewer\html" path="concat(/html/head/meta[@name='file']/@content,'.htm')"
        indent="{@IndentHtml}" omit-xml-declaration="false" add-xhtml-namespace="true" outputMethod="html" />
    </component>
  </helpOutput>

  <!-- This defines the set of components for websites -->
  <helpOutput format="Website">
    <!-- Add additional header resources -->
    <component id="Additional Header Resources Component">
      <stylesheet name="../styles/branding-Website.css" />
      <script name="../scripts/jquery-1.11.0.min.js" />
      <script name="../scripts/branding-Website.js" />
    </component>

    <!-- Resolve shared content -->
    <component id="Shared Content Component">
      <content file="{@ResourceItemsFolder}shared_content.xml" />
      <content file="{@ResourceItemsFolder}reference_content.xml" />
      <content file="{@ResourceItemsFolder}syntax_content.xml" />
      <!-- These must be last in order to override other elements! -->
      <content file="SHFBContent.xml" />
      {@ResourceItemFiles}
    </component>

    <!-- Resolve conceptual links -->
    <component id="Resolve Conceptual Links Component">
      <showBrokenLinkText value="true" />
      <targets base="xmlComp" type="Local" />
    </component>

    <!-- Resolve reference links -->
    <component id="Resolve Reference Links Component">
      <locale value="{@Locale}" />
      <linkTarget value="{@SdkLinkTarget}" />
      <msdnContentIdCache path="{@LocalDataFolder}Cache\MsdnContentId.cache" />
      <targets base="{@SHFBFolder}Data\Reflection" recurse="true" files="*.xml"
        type="{@WebsiteSdkLinkType}" id="FrameworkTargets">
        {@ReferenceLinkNamespaceFiles}
      </targets>
      <targets files="reflection.xml" type="Local" id="ProjectTargets" />
    </component>

    <!-- Convert language-specific text spans to script elements -->
    <component id="Language-Specific Text Component" />

    <!-- Save the result -->
    <component id="Save Component">
      <save base="Output\Website\html" path="concat(/html/head/meta[@name='file']/@content,'.htm')"
        indent="{@IndentHtml}" omit-xml-declaration="true" add-xhtml-namespace="false" outputMethod="html" />
    </component>
  </helpOutput>
</component>
See Also