IType Interface

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

Definition

Define a contract for accessing type-specific metadata.
public interface IType : IMember, IMetadataAdapter<Type>, IEquatable<IType>
Extends
Implemented by

Remarks

This interface abstracts common type metadata access, allowing consistent operations regardless of whether the type was loaded via Common Language Runtime (CLR) or Metadata Load Context (MLC).

Properties

BaseTypeGets the base type of this type.
BaseTypeHierarchyGets the hierarchy of base types, starting from the root base type down to the immediate base type.
DeclaringTypeHierarchyGets the hierarchy of declaring types, starting from the outermost declaring type down to the immediate declaring type.
ExtensionMethodsGets extension methods of the type.
ExtensionPropertiesGets extension properties of the type.
FullNameGets the full name of the type.
IsEnumGets a value indicating whether the type is an enumeration.
IsGenericTypeGets a value indicating whether the type is a generic type.
IsInterfaceGets a value indicating whether the type is an interface.
IsNestedGets a value indicating whether the type is nested.
IsPrimitiveGets a value indicating whether the type is a primitive type.
IsValueTypeGets a value indicating whether the type is a value type.
ParametricSignatureGets the signature of the type when used as a parameter or return type.
SignatureGets the general signature of the type.

Methods

IsAssignableFrom(IType)Determines whether the instances of the specified type can be assigned to variables of the current type.
ResolveMember(string)Resolves a type member based on the specified XML documentation cref string.

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.