DocumentationContext.ToScopedTopic Method

Namespace
Kampute.DocToolkit
Assembly
  • Kampute.DocToolkit.dll

Definition

Creates a contextual reference to the specified topic.
protected virtual TopicModel ToScopedTopic(ITopic topic)

Parameters

topic ITopic
The topic to scope.

Returns

TopicModel
A TopicModel representing the scoped topic.

Exceptions

ArgumentNullException
Thrown when topic is null.

Remarks

This method associates a topic with the context, creating a TopicModel that encapsulates both. This allows topics to be rendered in a context-aware manner.

Override this method in derived classes to customize how topics are scoped to contexts, for example, to apply additional properties or metadata to the topic based on the context.