UrlReferenceCollector Class

Namespace
Kampute.DocToolkit.Routing
Assembly
  • Kampute.DocToolkit.dll

Definition

Provides a URL transformer that records all URLs that are processed through it.
public sealed class UrlReferenceCollector : IUrlTransformer
Inheritance
Implements

Remarks

This class decorates an existing IUrlTransformer instance, intercepting URL transformation requests to record all URLs that are processed. It maintains a collection of UrlReference instances representing the URLs that have been recorded, along with their associated documentation models.

The recorded URLs can be used to validate links, generate reports, or perform other analysis on the URLs referenced in the documentation topics or <see> or <seealso> tags with href attributes in XML comments.

Thread Safety

All public members of the type are guaranteed to be thread-safe.

Constructors

UrlReferenceCollector(IDocumentationContext, IUrlTransformer)Initializes a new instance of the UrlReferenceCollector class.

Properties

MayTransformUrlsGets a value indicating whether the URL transformer is active and performs any URL transformations.
UrlsGets the collection of URLs that have been recorded so far.

Methods

TryTransformUrl(string, out Uri)Attempts to transform a URL string to a different URL.