PropertyAdapter Class
- Namespace
- Kampute.DocToolkit.Metadata.Adapters
- Assembly
- Kampute.DocToolkit.dll
Definition
An adapter that wraps a PropertyInfo and provides metadata access.
public class PropertyAdapter : VirtualTypeMemberAdapter<PropertyInfo>, IProperty- Inheritance
- Implements
Remarks
This class serves as a bridge between the reflection-based PropertyInfo and the metadata representation defined by the IProperty interface. It provides access to property-level information regardless of whether the assembly containing the property'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
| PropertyAdapter(IType, PropertyInfo) | Initializes a new instance of the PropertyAdapter class. |
Properties
| CanRead | Gets a value indicating whether the property can be read. |
| CanWrite | Gets a value indicating whether the property can be written. |
| GetMethod | Gets the get method of the property. |
| ImplementedProperty | Gets the interface property that this property implements, if any. |
| IsIndexer | Gets a value indicating whether the property is an indexer. |
| IsInitOnly | Gets a value indicating whether the property is init-only. |
| IsReadOnly | Gets a value indicating whether the property is read-only. |
| IsRequired | Gets a value indicating whether the property is required. |
| 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. |
| Overloads | Gets all the overloads of the member, excluding the member itself. |
| OverriddenProperty | Gets the base property that this property overrides, if any. |
| Parameters | Gets all the parameters declared by the member. |
| SetMethod | Gets the set method of the property. |
| Type | Gets the type of the property. |
Methods
| FindGenericDefinition() | Searches for the generic definition of this member if it is a constructed generic member. |
| FindImplementedMember() | Searches the implemented interfaces for a member that this member implements. |
| FindOverriddenMember() | Searches the base types for a member that this member overrides. |
| GetAccessors() | Gets all accessor methods (get and set) of the property. |
| GetCodeReferenceParts() | Retrieves the code reference parts for this member. |
| GetGetterMethod() | Retrieves the getter method of the property, if it exists. |
| GetIndexParameters() | Retrieves the index parameters of the property. |
| GetMemberVirtuality() | Retrieves the virtuality of the member. |
| GetMemberVisibility() | Retrieves the visibility of the member. |
| GetPropertyType() | Retrieves the type of the property. |
| GetSetterMethod() | Retrieves the setter method of the property, if it exists. |
| HasMatchingSignature(IProperty) | Determines whether the given property can be considered a base declaration of this property. |
| 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. |
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. |
