MintlifyLinkResolver

Resolves cross-references and generates links between types and members in documentation.

Syntax

public class MintlifyLinkResolver

Inheritance

Constructors

MintlifyLinkResolver

public MintlifyLinkResolver(MintlifyOptions options)
Initializes a new instance of the MintlifyLinkResolver class.

Parameters

Methods

BuildRegistry

public void BuildRegistry(AssemblyXmlDocumentation xmlDocumentation)
Builds the type and member registry from XML documentation.

Parameters

ResolveLinksInContent

public string ResolveLinksInContent(string content)
Processes text content and converts XML cref attributes to Mintlify links.

Parameters

  • content string: The content to process.

Returns

string The content with resolved links.
public string ResolveMemberLink(string memberReference)
Resolves a member reference to a Mintlify link.

Parameters

  • memberReference string: The member reference to resolve.

Returns

string A Mintlify link if the member is documented; otherwise, the original member name.
public string ResolveTypeLink(string typeReference)
Resolves a type reference to a Mintlify link.

Parameters

  • typeReference string: The type reference to resolve.

Returns

string A Mintlify link if the type is documented; otherwise, the original type name.

Remarks

This class handles the conversion of XML documentation references (like cref attributes) into proper Mintlify links, enabling seamless navigation between related types and members. It maintains a registry of all documented types to ensure accurate link resolution.