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

context IDocumentationContext
The documentation context to associate with this collection of topics.

Exceptions

ArgumentNullException
Thrown when context is null.

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

context IDocumentationContext
The documentation context to associate with this collection of topics.
modelFactory Func<IDocumentationContext, ITopic, TopicModel>
The factory function to create model instances for topics in the collection.

Exceptions

ArgumentNullException
Thrown when context or modelFactory is null.

TopicCollection(IDocumentationContext, IEnumerable<ITopic>)

Initializes a new instance of the TopicCollection class with initial topics.
public TopicCollection(IDocumentationContext context, IEnumerable<ITopic> topics)

Parameters

context IDocumentationContext
The documentation context to associate with this collection of topics.
topics IEnumerable<ITopic>
The initial topics to add to the collection.

Exceptions

ArgumentNullException
Thrown when context or topics is null.
ArgumentException
Thrown when topics contains 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

context IDocumentationContext
The documentation context to associate with this collection of topics.
modelFactory Func<IDocumentationContext, ITopic, TopicModel>
The factory function to create model instances for topics in the collection.
topics IEnumerable<ITopic>
The initial topics to add to the collection.

Exceptions

ArgumentNullException
Thrown when context, modelFactory, or topics is null.
ArgumentException
Thrown when topics contains a topic that is not a top-level topic.