Table of Contents

TopicTransformationCore Class

Definition

Namespace
Sandcastle.Core.PresentationStyle.Transformation
Assembly
Sandcastle.Core.dll

This abstract base class is used to define the settings and common functionality for a specific presentation style topic transformation.

public abstract class TopicTransformationCore
Inheritance
TopicTransformationCore

Remarks

This implements the core processing common to all presentation styles. While it can render presentation style neutral elements such as referenceLink and include elements, any presentation style specific elements such as HTML elements, Open XML elements, or markdown should be rendered by derived classes in the appropriate overridden methods.

Constructors

TopicTransformationCore(HelpFileFormats, Func<string, string>)

Constructor

Fields

VersionNumberSeparators

This returns the assembly version number separator characters

Properties

ApiMember

This read-only property returns common API member information for the API topic being rendered. This is not used for MAML topics.

ApiTopicSections

This read-only property returns an enumerable list of the API section handlers in the order that they will be rendered

BibliographyData

This read-only property returns the content of the bibliography data file if a BibliographyDataFile has been specified.

BibliographyDataFile

This is used to get or set the path to the bibliography data file for the bibliography and cite elements.

CodeSnippetLanguageConversion

This read-only property returns a dictionary containing code snippet language ID conversions

CommentsNode

This read-only property returns the comments node for the API topic being rendered. This is not used for MAML topics.

CurrentElement

This is used to get or set the current element to which rendered content is being added

DocumentNode

This read-only property returns the root document node for the topic being rendered

HasFooterContent

This property is used to get or set whether or not all pages should be have the footer content item inserted into them.

HasHeaderText

This property is used to get or set whether or not all pages should be have the header text item inserted into them.

HasWebsiteAdContent

This property is used to get or set whether or not all pages should be have the website ad content item inserted into them.

IconPath

This is used to get or set the path used for icons and other images in the presentation style

IsMamlTopic

This read-only property returns true if a MAML topic is being generated, false if an API topic is being generated

IsPreliminaryDocumentation

This property is used to get or set whether or not all pages should be marked with a "preliminary documentation" warning in the page header.

Key

This read-only property returns the topic key

LanguageFilter

This read-only property returns the language filter items for presentation styles that contain one in their topics.

Locale

This is used to get or set the locale

MetadataNode

This read-only property returns the metadata node for the topic being rendered

NoticeDefinitions

This read-only property returns an enumerable list of the notice definitions

ReferenceNode

This read-only property returns the reference node for the API topic being rendered. This is not used for MAML topics.

ResolvePath

This read-only property is used to get the function use to resolve a path to a presentation style content file of some sort.

ScriptPath

This is used to get or set the path used for scripts in the presentation style

StartupScriptBlockItemIds

This read-only property returns an enumerable list of the startup script block item IDs that have been registered.

StartupScriptBlocks

This read-only property returns an enumerable list of the startup script blocks that have been registered.

StyleSheetPath

This is used to get or set the path used for style sheets in the presentation style

SupportedFormats

This read-only property returns the help file formats supported by the presentation style

SyntaxNode

This read-only property returns the syntax node for the API topic being rendered. This is not used for MAML topics.

TopicNode

This read-only property returns the topic node for the MAML topic being rendered. This is not used for API topics.

TopicTemplatePath

This is used to get or set the topic template path if the presentation style makes use of one

TransformationArguments

This read-only property returns a dictionary used to contain transformation arguments used by the presentation style

UsesLegacyCodeColorizer

This property is used to get or set whether or not the presentation style transformation uses the legacy code colorizer.

Methods

AddApiTopicSectionHandler(ApiTopicSectionHandler)

Add a new API topic section handler

AddApiTopicSectionHandlerRange(IEnumerable<ApiTopicSectionHandler>)

Add a range of new API topic section handlers

AddElement(Element)

Add an element that will be transformed when the topic is rendered

AddElements(IEnumerable<Element>)

Add a range of elements that will be transformed when the topic is rendered

AddLanguageFilterItems(IEnumerable<LanguageFilterItem>)

This is used to add the language filter item information for presentation styles that contain a language filter in the topics.

AddLanguageSpecificText(LanguageSpecificText)

Add a language specific text entry

AddLanguageSpecificTextRange(IEnumerable<LanguageSpecificText>)

Add a range of language specific text entries

AddNoticeDefinition(Notice)

Add a notice definitions

AddNoticeDefinitions(IEnumerable<Notice>)

Add one or more notice definitions

AddTransformationArgument(TransformationArgument)

Add a new transformation argument

AddTransformationArgumentRange(IEnumerable<TransformationArgument>)

Add a range of new transformation arguments

ApiTopicOperatorTypes(bool)

Get parameter and return types for an operator API member topic (e.g. Int32 to Decimal)

ApiTopicParameterTypes(bool)

Get parameter types for an API member topic in plain text format

ApiTopicSectionHandlerFor(ApiTopicSectionType, string)

This is used to retrieve the current API topic section handler for the given section

ApiTopicShortNameDecorated()

Get the short type/member name for an API topic decorated with language-specific text. This is used for page title.

ApiTopicShortNamePlainText(bool)

Get the short type/member name for an API topic in plain text. This is used for metadata values and the table of contents title.

ApiTopicTitle(bool, bool)

Get the title for an API topic

ApiTopicTocTitleSimple()

Get the simple table of contents title for an API topic

ApiTypeNameDecorated(XElement, XElement)

This is used to get a type name in decorated with language-specific text elements based on the given type information.

ApiTypeNamePlainText(StringBuilder, XElement)

This is used to get a type name in plain text based on the given type information

ApiTypeNameWithTemplateCount(XElement)

This is used to get the type name with the template count if any (e.g. TypeName`2)

CreateApiTopicSectionHandlers()

This is called to create the API topic section handlers that will be used by the transformation

CreateElementHandlers()

This is called to create the element handlers that will be used by the transformation

CreateLanguageSpecificText()

This is called to create the language specific text elements that will be used by the transformation

CreateNoticeDefinitions()

This is called to create the API topic notice definitions that will be used by the transformation

CreateSection(string, bool, string, string)

Create a topic section with a title

CreateSubsection(bool, string)

Create a topic subsection with a title

CreateTransformationArguments()

This is called to create the transformation arguments that will be used by the transformation

ElementHandlerFor(string)

This is used to retrieve the current handler for the given element name

InsertApiTopicSectionHandlerAfter(ApiTopicSectionHandler, ApiTopicSectionHandler)

Insert an API topic section handler after the given section handler

InsertApiTopicSectionHandlerBefore(ApiTopicSectionHandler, ApiTopicSectionHandler)

Insert an API topic section handler before the given section handler

LanguageIdFor(string)

This is used to get the language ID for the given language from a syntax section or code example

LanguageSpecificApiNames(XElement)

This returns an enumerable list of plain text API member names with language-specific text for use in help index entries.

LanguageSpecificTextFor(string)

This is used to retrieve the language specific text for a given keyword

LoadTemplateFile(string, IEnumerable<(string Key, string Value)>)

Load a template file and perform any necessary substitution tag replacements

MamlTopicTitle()

Get the title for a MAML topic

OnRenderCompleted(XDocument)

This is used to raise the RenderCompleted event

OnRenderStarting(XDocument)

This is used to raise the RenderStarting event

OnSectionRendered(ApiTopicSectionType, string)

This is used to raise the SectionRendered event

OnUnhandledElement(string, string)

This is used to raise the UnhandledElement event

RegisterStartupScript(int, string)

This is used to register a block of script to execute in the $(document).ready() function by presentation styles that support script.

RegisterStartupScriptItem(int, string)

This is used to register a shared content item ID that contains a block of script with localized text. These will be added to a script element at the end of the document body by presentation styles that support script.

RemoveApiTopicSectionHandler(ApiTopicSectionType, string)

Remove an API topic section handler

Render(string, XDocument)

This is used to parse the topic data and render the topic output for the presentation style

RenderChildElements(XElement, IEnumerable<XNode>)

This makes the given parent element the current element, renders the list of children to it and then resets the current element to the prior current element.

RenderNode(XNode)

Render the given XML node based on its node type

RenderTextNode(XElement, XText)

This is used to render a text node

RenderTopic()

Render the topic content based on the topic type

RenderTypeReferenceLink(XElement, XElement, bool)

This is used to render a reference link based on the given type information

ReplaceApiTopicSectionHandler(ApiTopicSectionHandler)

Replace an API topic section handler with a new one

ReplaceElement(Element)

Replace an element handler

ReplaceElements(IEnumerable<Element>)

Replace a range of elements

ReplaceLanguageSpecificText(LanguageSpecificText)

Replace a language specific text entry

ReplaceLanguageSpecificTextRange(IEnumerable<LanguageSpecificText>)

Replace a range of language specific text entries

Events

RenderCompleted

This event is raised to notify the user that the topic has been completely rendered

RenderStarting

This event is raised to notify the user that the topic is about to be rendered

SectionRendered

This event is raised to notify the user of section having been rendered

UnhandledElement

This event is raised to notify the user of an unhandled element