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 all extension methods applicable to the type in the containing assembly.
FullNameGets the full name of the type.
IsGenericTypeGets a value indicating whether the type is a generic type.
IsNestedGets a value indicating whether the type is nested.
IsValueTypeGets a value indicating whether the type is a value type.
ParametericSignatureGets 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.
IsSubstitutableBy(IType)Determines whether the specified type as a parameter type can be substituted for the current 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.