UrlReference Constructors

Namespace
Kampute.DocToolkit.Routing
Assembly
  • Kampute.DocToolkit.dll
UrlReference(DocumentUrlContext, string, Uri)Initializes a new instance of the UrlReference class using the specified scope.
UrlReference(IDocumentModel, string, string, Uri)Initializes a new instance of the UrlReference class using the referencing model and base directory.

UrlReference(DocumentUrlContext, string, Uri)

Initializes a new instance of the UrlReference class using the specified scope.
public UrlReference(DocumentUrlContext scope, string sourceUrl, Uri targetUrl = null)

Parameters

scope DocumentUrlContext
The scope in which the URL is referenced.
sourceUrl string
The original URL string from the documentation source (e.g., XML comment or topic).
targetUrl Uri optional
The URI corresponding to the sourceUrl in the generated documentation, if available.

Exceptions

ArgumentNullException
Thrown when scope or sourceUrl is null.
ArgumentException
Thrown when the scope does not have an associated documentation model.

UrlReference(IDocumentModel, string, string, Uri)

Initializes a new instance of the UrlReference class using the referencing model and base directory.
public UrlReference(
	IDocumentModel referencingModel,
	string baseDirectory,
	string sourceUrl,
	Uri targetUrl = null)

Parameters

referencingModel IDocumentModel
The documentation model in which the URL is referenced.
baseDirectory string
The directory path of the referencing model's documentation page, relative to the documentation root.
sourceUrl string
The original URL string from the documentation source (e.g., XML comment or topic).
targetUrl Uri optional
The URI corresponding to the sourceUrl in the generated documentation, if available.

Exceptions

ArgumentNullException
Thrown when referencingModel, baseDirectory, or sourceUrl is null.