DocumentationContextBuilder<TContext>.AddTopic Method

Namespace
Kampute.DocToolkit
Assembly
  • Kampute.DocToolkit.dll
DocumentationContextBuilder<TContext>.AddTopic(ITopic)Adds a top-level topic, including its subtopics, to the documentation.
DocumentationContextBuilder<TContext>.AddTopic(string, string)Adds a top-level topic to the documentation using the specified topic ID and file path.

DocumentationContextBuilder<TContext>.AddTopic(ITopic)

Adds a top-level topic, including its subtopics, to the documentation.
public virtual DocumentationContextBuilder<TContext> AddTopic(ITopic topic)

Parameters

topic ITopic
The topic to add.

Returns

DocumentationContextBuilder<TContext>
The current builder instance for method chaining.

Exceptions

ArgumentNullException
Thrown when topic is null.
ArgumentException
Thrown when topic is a subtopic.
Thrown when a topic with the same ID already exists.

DocumentationContextBuilder<TContext>.AddTopic(string, string)

Adds a top-level topic to the documentation using the specified topic ID and file path.
public virtual DocumentationContextBuilder<TContext> AddTopic(string topicId, string topicPath)

Parameters

topicId string
The unique identifier of the topic.
topicPath string
The path to the topic file.

Returns

DocumentationContextBuilder<TContext>
The current builder instance for method chaining.

Exceptions

ArgumentException
Thrown when topicId or topicPath is null, empty, or whitespace.
Thrown when topicId is already used by another topic.
FileNotFoundException
Thrown when the topic file cannot be found.