PrimitiveTypeAdapter Class

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

Definition

An adapter that wraps a reflection Type representing a primitive type and provides metadata access.
public class PrimitiveTypeAdapter : TypeAdapter, IPrimitiveType
Inheritance
Implements

Remarks

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

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

Properties

FieldsGets all the public or protected fields declared by the type.
InterfacesGets all the interfaces that the type extends, implements, or inherits.
MethodsGets all the public or protected methods declared, overridden, or implemented by the type.
OperatorsGets all the operator methods declared by the type.

Methods

GetFields()Retrieves the fields declared by the primitive type.
GetInterfaces()Retrieves the interfaces implemented or inherited by the type.
GetMethods()Retrieves the methods declared by the primitive type.
GetOperators()Retrieves the operators declared by the primitive type.

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.