TopicSource Class
- Namespace
- Kampute.DocToolkit.Topics.Abstracts
- Assembly
- Kampute.DocToolkit.dll
Definition
Provides the base functionality for a topic source.
public abstract class TopicSource : IMutableTopic- Inheritance
- object
- TopicSource
- Implements
- Inherited by
Remarks
Thread Safety
Public static members of the type are guaranteed to be thread-safe. However, public instance members are not thread-safe.
Constructors
| TopicSource(string) | Initializes a new instance of the TopicSource class. |
Properties
| Id | Gets the unique identifier of the topic among its siblings. |
| ParentTopic | Gets or sets the parent topic of the topic. |
| Subtopics | Gets the collection of subtopics of the topic. |
| Title | Gets or sets the title of the topic. |
Methods
| AddSubtopic(IMutableTopic) | Adds a subtopic to the current topic. |
| GenerateTitle() | Generates the title of the topic based on its name or content. |
| RemoveSubtopic(IMutableTopic) | Removes a subtopic from the current topic. |
| Render(TextWriter, IDocumentationContext) | Renders the content of the topic to the specified TextWriter. |
| ToString() | Returns a string that represents the current object. |
| WouldCreateCircularReference(IMutableTopic) | Checks if adding the specified topic as a subtopic would create a circular reference. |
Explicit Interface Implementations
| ITopic.ParentTopic | Gets the parent topic of the topic. |
| ITopic.Title | Gets the title of the topic. |

The class allows for the management of topic name, title, and parent-child relationships between topics. The subclass can override the Render(TextWriter, IDocumentationContext) method to provide custom rendering logic for the topic's content.