GenericCapableTypeAdapter Class

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

Definition

An abstract adapter that wraps a generic-capable Type and provides metadata access.
public abstract class GenericCapableTypeAdapter : TypeAdapter, IGenericCapableType
Inheritance
Implements
Inherited by

Remarks

This class serves as a bridge between the reflection-based Type and the metadata representation defined by the IGenericCapableType interface. It provides access to generic type information regardless of whether the assembly containing the 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

GenericCapableTypeAdapter(object, Type)Initializes a new instance of the GenericCapableTypeAdapter class.

Properties

GenericTypeDefinitionGets the generic type definition if the type is a constructed generic type.
IsConstructedGenericTypeGets a value indicating whether the type is a constructed generic type.
IsDirectDeclarationGets a value indicating whether the member represents a direct declaration.
IsGenericTypeDefinitionGets a value indicating whether the type is a generic type definition.
OwnGenericParameterRangeGets the offset and number of generic parameters belonging exclusively to this type, excluding any from its declaring type, if the type is generic.
TypeArgumentsGets the type arguments provided to the type if the type is a constructed generic type.
TypeParametersGets the type parameters declared by the type and its declaring types if the type is a generic type definition.
UnqualifiedNameGets the unqualified name of the type without any generic arity suffix.

Methods

ConstructSignature(bool)Constructs the signature of the type.
GetGenericTypeDefinition()Retrieves the generic type definition if the type is a constructed generic type.
GetOwnGenericParameterRange()Retrieves the offset and number of generic parameters belonging exclusively to this type, excluding any from its declaring type, if the type is generic.
GetTypeArguments()Retrieves the type arguments provided to the type if the type is a constructed generic type.
GetTypeParameters()Retrieves the type parameters defined by the type if the type is a generic type definition.

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.
GetMembers(this IType)Gets all members directly declared by the type, excluding nested types.
GetMembersIncludingNested(this IType)Gets all members of the type, including its nested types and their members at all nesting levels.
TryGetOwnTypeParameters(this IMember, out IEnumerable<ITypeParameter>)Attempts to get the type parameters declared directly by the specified member if it is generic.