ContextAwareUrlTransformer Class

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

Definition

Provides a context-aware URL transformer for transforming non-API site-root-relative URLs into absolute or document-relative URLs.
public class ContextAwareUrlTransformer : IUrlTransformer
Inheritance
  • object
  • ContextAwareUrlTransformer
Implements

Remarks

This class implements the IUrlTransformer interface and is designed to work with a specific documentation context. It allows for the transformation of URLs based on the current documentation context, ensuring that relative links are correctly resolved to their target topics or resources.

Constructors

ContextAwareUrlTransformer(IDocumentationContext)Initializes a new instance of the ContextAwareUrlTransformer class.

Properties

ContextGets the documentation context used for transforming URLs.
MayTransformUrlsGets a value indicating whether the URLs need to be transformed based on the current context and the active URL context.

Methods

TryTransformUrl(string, out Uri)Attempts to transform a URL string into an absolute or document-relative URL.

See Also