FieldAdapter Class
- Namespace
- Kampute.DocToolkit.Metadata.Adapters
- Assembly
- Kampute.DocToolkit.dll
Definition
An adapter that wraps a FieldInfo and provides metadata access.
public class FieldAdapter : TypeMemberAdapter<FieldInfo>, IField- Inheritance
- Implements
Remarks
This class serves as a bridge between the reflection-based FieldInfo and the metadata representation defined by the IField interface. It provides access to field-level information regardless of whether the assembly containing the field's 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
| FieldAdapter(IType, FieldInfo) | Initializes a new instance of the FieldAdapter class. |
Properties
| IsFixedSizeBuffer | Gets a value indicating whether the field is a fixed-size buffer. |
| IsLiteral | Gets a value indicating whether the field is a literal (constant). |
| IsReadOnly | Gets a value indicating whether the field is read-only. |
| IsSpecialName | Gets a value indicating whether the member is a special name. |
| IsStatic | Gets a value indicating whether the member is static. |
| IsUnsafe | Gets a value indicating whether this member is declared as unsafe. |
| IsVolatile | Gets a value indicating whether the field is volatile. |
| LiteralValue | Gets the constant value of the field, if it is a literal. |
| Type | Gets the type of the field. |
Methods
| GetCodeReferenceParts() | Retrieves the code reference parts for this member. |
| GetMemberVisibility() | Retrieves the visibility of the member. |
| HasOptionalCustomModifier(string) | Determines whether the element has a specific optional custom modifier applied. |
| HasRequiredCustomModifier(string) | Determines whether the element has a specific required custom modifier applied. |
| TryGetFixedSizeBufferInfo(out IType, out int) | Attempts to get information about the fixed-size buffer, if applicable. |
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. |
| TryGetOwnTypeParameters(this IMember, out IEnumerable<ITypeParameter>) | Attempts to get the type parameters declared directly by the specified member if it is generic. |
