IDocumentUrlContextProvider Interface

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

Definition

Defines a contract for establishing and managing document-specific URL contexts for adjusting cross-document relative links.
public interface IDocumentUrlContextProvider
Implemented by

Remarks

This interface provides a mechanism to establish a temporary context for the document currently being rendered, enabling proper URL adjustment based on the document's location in the documentation hierarchy.

Implementations of this interface track the current document's path information, which serves as the basis for normalizing relative URLs referenced within that document. This ensures that navigation between documents works correctly regardless of the document's location in the hierarchy.

The context can be established temporarily for a single document and then automatically restored when processing is complete by disposing the DocumentUrlContext returned by BeginScope(string, IDocumentModel).

Properties

ActiveScopeGets the currently active URL context.

Methods

BeginScope(string, IDocumentModel)Creates a scoped URL context for the specified document path and model.

See Also