OverloadCollection<T> Class

Namespace
Kampute.DocToolkit.Collections
Assembly
  • Kampute.DocToolkit.dll

Definition

Represents a collection of members that are overloads of each other.
public class OverloadCollection<T> : IDocumentModel, IReadOnlyCollection<T>
	where T : TypeMemberModel
Inheritance
Implements

Type Parameters

T
The type of members in the collection.

Remarks

The OverloadCollection<T> class provides a way to group and organize members that represent different overloads of the same method, constructor, or other member. This collection ensures that all contained members share the same name and declaring type, providing a consistent view of related members.

The collection preserves the documentation context of the overloaded members and provides common properties such as name, declaring type, and documentation URL. It is particularly useful for documentation generators that need to represent multiple overloads of a member together while still providing access to each individual overload.

Thread Safety

Public static members of the type are guaranteed to be thread-safe. However, public instance members are not thread-safe.

Constructors

OverloadCollection<T>(IEnumerable<T>)Initializes a new instance of the OverloadCollection<T> class.

Properties

AssemblyGets the assembly that contains the overloaded members.
ContextGets the documentation context.
CountGets the number of members in the collection.
DeclaringTypeGets the declaring type of the overloaded members.
DocGets the common documentation for overloaded members.
HierarchyPathGets the hierarchy path of the parent models leading to this model.
Item[int]Gets the member at the specified index.
ModelTypeGets the type of the documentation model.
NameGets the name of the overloaded members.
NamespaceGets the namespace of the overloaded members.
UrlGets the common documentation URL for the overloaded members.

Methods

GetEnumerator()Returns an enumerator that iterates through the collection of members.
ToString()Returns a string that represents the current object.
TryGetDocumentationFile(out string)Get the common relative path of the documentation file for the overloaded members.

Explicit Interface Implementations

IEnumerable.GetEnumerator()Returns an enumerator that iterates through the collection.