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
topicITopic- The topic to add.
Returns
- DocumentationContextBuilder<TContext>
- The current builder instance for method chaining.
Exceptions
- ArgumentNullException
- Thrown when
topicisnull. - ArgumentException
- Thrown when
topicis 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
Returns
- DocumentationContextBuilder<TContext>
- The current builder instance for method chaining.
Exceptions
- ArgumentException
- Thrown when
topicIdortopicPathisnull, empty, or whitespace. - Thrown when
topicIdis already used by another topic. - FileNotFoundException
- Thrown when the topic file cannot be found.
