ConstructorAdapter Class

Namespace
Kampute.DocToolkit.Metadata.Adapters
Assembly
  • Kampute.DocToolkit.dll

Definition

An adapter that wraps a ConstructorInfo and provides metadata access.
public class ConstructorAdapter : TypeMemberAdapter<ConstructorInfo>, IConstructor
Inheritance
Implements

Remarks

This class serves as a bridge between the reflection-based ConstructorInfo and the metadata representation defined by the IConstructor interface. It provides access to constructor-level information regardless of whether the assembly containing the constructor's type was loaded via Common Language Runtime (CLR) or Metadata Load Context (MLC).

Thread Safety

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

Constructors

ConstructorAdapter(IType, ConstructorInfo)Initializes a new instance of the ConstructorAdapter class.

Properties

BaseConstructorGets the constructor in the base class that has the same signature as this constructor, if any.
IsSpecialNameGets a value indicating whether the member is a special name.
IsStaticGets a value indicating whether the member is static.
IsUnsafeGets a value indicating whether this member is declared as unsafe.
OverloadsGets all the overloads of the member, excluding the member itself.
ParametersGets all the parameters declared by the member.

Methods

FindBaseConstructor()Finds the constructor in the base class that has the same signature as this constructor, if any.
GetCodeReferenceParts()Retrieves the code reference parts for this member.
GetMemberVisibility()Retrieves the visibility of the member.
GetParameters()Retrieves the parameters of the constructor.
HasMatchingSignature(IConstructor)Determines whether the given constructor can be considered a base declaration of this constructor.

Extension Methods

GetInheritedMember(this IMember)Retrieves the member that this member directly inherits from.
GetMemberDefinition(this IMember)Retrieves the definition of the member, resolving any constructed or decorated forms to their underlying definitions.
TryGetOwnTypeParameters(this IMember, out IEnumerable<ITypeParameter>)Attempts to get the type parameters declared directly by the specified member if it is generic.