Definition

Assembly: CloudNimble.DotNetDocs.Core.dll Namespace: CloudNimble.DotNetDocs.Core Inheritance: System.Object

Syntax

CloudNimble.DotNetDocs.Core.DocReference

Summary

Represents a cross-reference in documentation, such as a see or seealso tag.

Remarks

This class encapsulates all information needed to resolve and render a documentation reference, including the original reference string, resolved display name, relative path, and anchor for member-level references.

Constructors

.ctor

Initializes a new instance of the DocReference class.

Syntax

public DocReference()

.ctor

Initializes a new instance of the DocReference class with a raw reference.

Syntax

public DocReference(string rawReference)

Parameters

NameTypeDescription
rawReferencestringThe raw reference string from XML documentation.

Properties

Anchor

Gets or sets the anchor for member-level references.

Syntax

public string Anchor { get; set; }

Property Value

Type: string? The anchor name for linking to specific members within a type, or null for type-level references.

Examples

For a reference to an enum value, this would be “file” for NamespaceMode.File.

DisplayName

Gets or sets the display name for the reference.

Syntax

public string DisplayName { get; set; }

Property Value

Type: string? The human-readable name to display for this reference.

Examples

For a member reference, this might be “NamespaceMode.File” or just “File” depending on context.

IsResolved

Gets or sets a value indicating whether this reference has been successfully resolved.

Syntax

public bool IsResolved { get; set; }

Property Value

Type: bool True if the reference was found and resolved; otherwise, false.

RawReference

Gets or sets the original reference string from the XML documentation.

Syntax

public string RawReference { get; set; }

Property Value

Type: string The raw cref value including any prefix (T:, F:, P:, M:, E:).

Examples

F:CloudNimble.DotNetDocs.Core.Configuration.NamespaceMode.File

ReferenceType

Gets or sets the type of reference.

Syntax

public CloudNimble.DotNetDocs.Core.ReferenceType ReferenceType { get; set; }

Property Value

Type: CloudNimble.DotNetDocs.Core.ReferenceType? The classification of this reference.

RelativePath

Gets or sets the resolved root-relative path to the target documentation.

Syntax

public string RelativePath { get; set; }

Property Value

Type: string? The root-relative path to the target document (starting with /), or null if unresolved.

Examples

/Configuration/NamespaceMode.md

TargetEntity

Gets or sets the target entity that this reference points to.

Syntax

public CloudNimble.DotNetDocs.Core.DocEntity TargetEntity { get; set; }

Property Value

Type: CloudNimble.DotNetDocs.Core.DocEntity? The resolved DocEntity, or null if the reference couldn’t be resolved.

Methods

Generates a Markdown link for this reference.

Syntax

public string ToMarkdownLink()

Returns

Type: string A Markdown-formatted link, or inline code if the reference is unresolved.