Skip to main content

Definition

Assembly: CloudNimble.DotNetDocs.Core.dll Namespace: CloudNimble.DotNetDocs.Core.Transformers Inheritance: CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase

Syntax

Summary

Transforms XML documentation tags in DocEntity properties to Markdown format.

Remarks

This transformer converts XML documentation tags to their Markdown equivalents. The traversal of the documentation model, the skipping of strings without tags, and the resolution of cref references come from XmlTransformerBase; this class only decides how each tag is written in Markdown.

Constructors

.ctor

Initializes a new instance of the MarkdownXmlTransformer class.

Syntax

Parameters

.ctor Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Initializes a new instance of the XmlTransformerBase class.

Syntax

Parameters

.ctor Inherited

Inherited from object

Syntax

Properties

CurrentPath Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Gets the path of the documentation page for the entity currently being transformed.

Syntax

Property Value

Type: string

Remarks

The path is updated when the transformer reaches a namespace or a type. Members and parameters keep the path of the type that contains them, because they are rendered on the same page.

ProjectContext Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Gets the project context that supplies the configuration and file naming options.

Syntax

Property Value

Type: CloudNimble.DotNetDocs.Core.ProjectContext

Methods

AddToReferenceMap Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Adds an entity to the reference map with its documentation ID and path.

Syntax

Parameters

BuildReferenceMap Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Rebuilds the reference map from a documentation assembly.

Syntax

Parameters

ConvertText Inherited Virtual

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Converts a documentation string, skipping the conversion when the string has nothing to convert.

Syntax

Parameters

Returns

Type: string? The converted text, or the original text when it is null, whitespace, or contains no tags.

Remarks

Indentation is left as it is. AssemblyManager already removed the XML documentation file’s indentation when it extracted the text, and conceptual content is indented on purpose, for example in code blocks and nested lists.

ConvertXml Inherited Abstract

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Converts the XML documentation tags in a string into the output format.

Syntax

Parameters

Returns

Type: string The converted text.

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetAnchor Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Gets the anchor for a resolved documentation reference.

Syntax

Parameters

Returns

Type: string? The lowercase member name for members, or null for assemblies, namespaces, and types, which have their own pages, and for enum values, which are rows in their enum’s table.

GetAssemblyDocumentationId Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Gets the documentation ID for an assembly using the A: prefix.

Syntax

Parameters

Returns

Type: string The documentation ID in the format “A:AssemblyName”.

GetDisplayName Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Gets a human-readable display name for a documentation reference.

Syntax

Parameters

Returns

Type: string A display name suitable for rendering in documentation.

Remarks

Members and enum values include their type’s simple name for clarity, such as NamespaceMode.File.

GetFrameworkDocumentationUrl Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Generates a Microsoft Learn documentation URL for a .NET type.

Syntax

Parameters

Returns

Type: string The URL to the type’s documentation on Microsoft Learn.

Remarks

Microsoft Learn writes the generic arity as -1 instead of “1and nested types with a dot, soSystem.Collections.Generic.List1 becomes system.collections.generic.list-1.

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetLanguageKeywordUrl Inherited Virtual

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Gets the Microsoft Learn URL for a C# language keyword.

Syntax

Parameters

Returns

Type: string? The URL for the keyword, or null when the keyword has no dedicated page.

GetMemberDocumentationId Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Gets the documentation ID for a member using the appropriate prefix (F:, P:, M:, E:).

Syntax

Parameters

Returns

Type: string The documentation ID in the format “Prefix:TypeName.MemberName”.

GetNamespaceDocumentationId Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Gets the documentation ID for a namespace using the N: prefix.

Syntax

Parameters

Returns

Type: string The documentation ID in the format “N:NamespaceName”.

GetNamespacePath Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Gets the documentation page path for a namespace.

Syntax

Parameters

Returns

Type: string The relative path to the namespace documentation page.

Remarks

Uses ProjectContext.GetNamespacePagePath, the same source the renderers use to write the page.

GetRelativePath Inherited Virtual

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Gets a root-relative path from one document to another, including the API reference path prefix.

Syntax

Parameters

Returns

Type: string A root-relative path including the API reference path prefix.

GetSimpleTypeName Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Gets the simple name of a type by removing its namespace.

Syntax

Parameters

Returns

Type: string The type name without its namespace.

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

GetTypeDocumentationId Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Gets the documentation ID for a type using the T: prefix.

Syntax

Parameters

Returns

Type: string The documentation ID in the format “T:FullTypeName”.

GetTypePath Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Gets the documentation page path for a type.

Syntax

Parameters

Returns

Type: string The relative path to the type documentation page.

Remarks

Uses ProjectContext.GetTypePagePath, the same source the renderers use to write the page.

IndexEnumValue Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Indexes an enum value in the reference map as F:Enum.Value and Enum.Value.

Syntax

Parameters

Remarks

Enum values are rendered in a table on the enum’s page, so they resolve to that page with no anchor.

IndexMember Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Indexes a member in the reference map by its type-qualified name and by its Roslyn documentation ID.

Syntax

Parameters

IndexNamespace Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Indexes a namespace and all its types in the reference map.

Syntax

Parameters

IndexType Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Indexes a type and all its members in the reference map.

Syntax

Parameters

IsFrameworkType Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Determines whether a type name belongs to a .NET, Microsoft, or Windows namespace.

Syntax

Parameters

Returns

Type: bool True if the type is in a System, Microsoft, or Windows namespace; otherwise, false.

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

NormalizeXmlDocIndentation Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Normalizes indentation artifacts from XML documentation file formatting.

Syntax

Parameters

Returns

Type: string The text with XML file indentation removed from all lines.

Remarks

AssemblyManager calls this when it extracts text. Trimming the extracted string strips the first line’s leading whitespace but leaves continuation lines with their XML file indentation. XmlTransformerBase.RemoveCommonIndentation handles the uniform case (all lines indented); this method handles the mixed case where the first line has indent 0 but the rest share a common indent from the XML file structure.

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

RemoveCommonIndentation Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Removes the leading whitespace that every non-empty line of a block shares.

Syntax

Parameters

Returns

Type: string The block with the common indentation removed and the result trimmed.

ResolveReference Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Resolves a documentation reference to a DocReference with its path, anchor, and display name.

Syntax

Parameters

Returns

Type: CloudNimble.DotNetDocs.Core.DocReference A DocReference that is resolved when the target is in the reference map, is a framework type, or is a URL.

ResolveReferences Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Resolves every reference in a collection of raw reference strings.

Syntax

Parameters

Returns

Type: System.Collections.Generic.ICollection<CloudNimble.DotNetDocs.Core.DocReference> The resolved references, in the same order as rawReferences.

StripParameters Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Removes the parameter list from a method or indexer reference.

Syntax

Parameters

Returns

Type: string The reference up to its parameter list, such as M:System.String.Format, or the reference unchanged when it has none.

Remarks

Parameter types contain dots, so names must be split only after the parameter list is removed.

StripPrefix Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Strips the documentation prefix (T:, M:, F:, P:, E:, N:, A:) from a reference string.

Syntax

Parameters

Returns

Type: string The reference string without the prefix.

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?

TransformAsync Inherited

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Transforms a documentation entity and all of its children by converting their XML documentation tags.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task A task representing the asynchronous transformation operation.

Remarks

When entity is a DocAssembly, the reference map is rebuilt from it first, so cref references resolve against the assembly being transformed.

TransformEntityRecursive Inherited Virtual

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Transforms an entity’s documentation strings, resolves its seealso references, and then transforms its children.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task A task representing the asynchronous transformation operation.

UpdateCurrentPath Inherited Virtual

Inherited from CloudNimble.DotNetDocs.Core.Transformers.XmlTransformerBase
Updates XmlTransformerBase.CurrentPath when the transformer reaches a namespace or a type.

Syntax

Parameters

  • CloudNimble.DotNetDocs.Core.IDocTransformer