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
- ClassTypeAdapter
- CompositeTypeAdapter
- DelegateTypeAdapter
- EnumTypeAdapter
- GenericCapableTypeAdapter
- InterfaceTypeAdapter
- PrimitiveTypeAdapter
- StructTypeAdapter
- TypeAdapter
- TypeDecoratorAdapter
- TypeParameterAdapter
- IClassType
- ICompositeType
- IDelegateType
- IEnumType
- IGenericCapableType
- IInterfaceCapableType
- IInterfaceType
- IPrimitiveType
- IStructType
- ITypeDecorator
- ITypeParameter
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
| BaseType | Gets the base type of this type. |
| BaseTypeHierarchy | Gets the hierarchy of base types, starting from the root base type down to the immediate base type. |
| DeclaringTypeHierarchy | Gets the hierarchy of declaring types, starting from the outermost declaring type down to the immediate declaring type. |
| ExtensionMethods | Gets all extension methods applicable to the type in the containing assembly. |
| FullName | Gets the full name of the type. |
| IsGenericType | Gets a value indicating whether the type is a generic type. |
| IsNested | Gets a value indicating whether the type is nested. |
| IsValueType | Gets a value indicating whether the type is a value type. |
| ParametericSignature | Gets the signature of the type when used as a parameter or return type. |
| Signature | Gets 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. |
