DocumentAddressProvider.BeginScope Method
- Namespace
- Kampute.DocToolkit.Routing
- Assembly
- Kampute.DocToolkit.dll
Definition
Creates a scoped URL context for the specified document path and model.
public virtual DocumentUrlContext BeginScope(string directory, IDocumentModel model)Parameters
directorystring- The directory path of the document being rendered relative to the documentation root.
modelIDocumentModel- The document model being processed, or
nullif not applicable.
Returns
- DocumentUrlContext
- A DocumentUrlContext object that represents the scoped URL context. When disposed, the context will be reset.
Remarks
This method should be called before processing a document to establish the correct context for resolving any relative URLs within that document. The returned context object should be disposed when document processing is complete to restore the previous context.
