NamespaceModel Class

Namespace
Kampute.DocToolkit.Models
Assembly
  • Kampute.DocToolkit.dll

Definition

Represents a documentation model for a .NET namespace.
public class NamespaceModel : IDocumentModel, IEquatable<NamespaceModel>
Inheritance
Implements

Remarks

The NamespaceModel class represents a logical container for related types in the documentation model. Namespaces serve as the primary organizational unit in .NET projects, grouping related functionality together.

This class provides methods to:
  • Access all types defined within the namespace
  • Find specific members by their reflection metadata
  • Handle namespace merging across multiple assemblies

Thread Safety

All public members of the type are guaranteed to be thread-safe.

Constructors

NamespaceModel(IDocumentationContext, string)Initializes a new instance of the NamespaceModel class.
NamespaceModel(IDocumentationContext, string, IEnumerable<TypeModel>)Initializes a new instance of the NamespaceModel class with the specified types.

Properties

ContextGets the documentation context associated with the namespace.
DocGets the documentation for the namespace.
HierarchyPathGets the hierarchy of parent models that lead to this namespace.
ModelTypeGets the type of the documentation model.
NameGets the name of the namespace.
TypesGets the types defined in the namespace.
UrlGet the URL for the namespace documentation.

Methods

Equals(NamespaceModel)Determines whether the specified namespace is equal to the current namespace.
Equals(object)Determines whether the specified object is equal to the current object.
GetHashCode()Returns the hash code for this instance.
MergeDuplicates(IEnumerable<NamespaceModel>)Merges duplicate namespace entries by combining their type information.
ToString()Returns a string that represents the current object.
TryGetDocumentationFile(out string)Attempts to get the relative path of the documentation file for the namespace.