TypeDecoratorAdapter Class
- Namespace
- Kampute.DocToolkit.Metadata.Adapters
- Assembly
- Kampute.DocToolkit.dll
Definition
An adapter that wraps a reflection Type representing an array, pointer, by-ref, or nullable type and provides metadata access.
public class TypeDecoratorAdapter : TypeAdapter, ITypeDecorator- Inheritance
- object
- MetadataAdapter<Type>
- AttributeAwareMetadataAdapter<Type>
- MemberAdapter<Type>
- TypeAdapter
- TypeDecoratorAdapter
- Implements
Remarks
This class serves as a bridge between the reflection-based Type and the metadata representation defined by the ITypeDecorator interface. It provides access type-level 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
| TypeDecoratorAdapter(object, Type) | Initializes a new instance of the TypeDecoratorAdapter class. |
Properties
| ArrayRank | Gets the rank of the array if the type is an array. |
| ElementType | Gets the element type. |
| IsDirectDeclaration | Gets a value indicating whether the member represents a direct declaration. |
| IsUnsafe | Gets a value indicating whether this member is declared as unsafe. |
| Modifier | Gets the type modifier that indicates how the type decorates or wraps an element type. |
Methods
| ConstructSignature(bool) | Constructs the signature of the type. |
| GetElementModifier(Type) | Determines the kind of decoration applied to the specified type. |
| GetElementType() | Retrieves the underlying element type of the decorator type. |
| 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. |
