TopicCollection Constructors
- Namespace
- Kampute.DocToolkit.Collections
- Assembly
- Kampute.DocToolkit.dll
| TopicCollection(IDocumentationContext) | Initializes a new instance of the TopicCollection class. |
| TopicCollection(IDocumentationContext, Func<IDocumentationContext, ITopic, TopicModel>) | Initializes a new instance of the TopicCollection class with a custom topic factory. |
| TopicCollection(IDocumentationContext, IEnumerable<ITopic>) | Initializes a new instance of the TopicCollection class with initial topics. |
| TopicCollection(IDocumentationContext, Func<IDocumentationContext, ITopic, TopicModel>, IEnumerable<ITopic>) | Initializes a new instance of the TopicCollection class with a custom topic factory and initial topics. |
TopicCollection(IDocumentationContext)
Initializes a new instance of the TopicCollection class.
public TopicCollection(IDocumentationContext context)Parameters
contextIDocumentationContext- The documentation context to associate with this collection of topics.
Exceptions
- ArgumentNullException
- Thrown when
contextisnull.
TopicCollection(IDocumentationContext, Func<IDocumentationContext, ITopic, TopicModel>)
Initializes a new instance of the TopicCollection class with a custom topic factory.
public TopicCollection(IDocumentationContext context, Func<IDocumentationContext, ITopic, TopicModel> modelFactory)Parameters
contextIDocumentationContext- The documentation context to associate with this collection of topics.
modelFactoryFunc<IDocumentationContext, ITopic, TopicModel>- The factory function to create model instances for topics in the collection.
Exceptions
- ArgumentNullException
- Thrown when
contextormodelFactoryisnull.
TopicCollection(IDocumentationContext, IEnumerable<ITopic>)
Initializes a new instance of the TopicCollection class with initial topics.
public TopicCollection(IDocumentationContext context, IEnumerable<ITopic> topics)Parameters
contextIDocumentationContext- The documentation context to associate with this collection of topics.
topicsIEnumerable<ITopic>- The initial topics to add to the collection.
Exceptions
- ArgumentNullException
- Thrown when
contextortopicsisnull. - ArgumentException
- Thrown when
topicscontains a topic that is not a top-level topic.
TopicCollection(IDocumentationContext, Func<IDocumentationContext, ITopic, TopicModel>, IEnumerable<ITopic>)
Initializes a new instance of the TopicCollection class with a custom topic factory and initial topics.
public TopicCollection(IDocumentationContext context, Func<IDocumentationContext, ITopic, TopicModel> modelFactory, IEnumerable<ITopic> topics)Parameters
contextIDocumentationContext- The documentation context to associate with this collection of topics.
modelFactoryFunc<IDocumentationContext, ITopic, TopicModel>- The factory function to create model instances for topics in the collection.
topicsIEnumerable<ITopic>- The initial topics to add to the collection.
Exceptions
- ArgumentNullException
- Thrown when
context,modelFactory, ortopicsisnull. - ArgumentException
- Thrown when
topicscontains a topic that is not a top-level topic.
