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

CanReadGets a value indicating whether the property can be read.
CanWriteGets a value indicating whether the property can be written.
GetMethodGets the get method of the property.
ImplementedPropertyGets the interface property that this property implements, if any.
IsIndexerGets a value indicating whether the property is an indexer.
IsInitOnlyGets a value indicating whether the property is init-only.
IsReadOnlyGets a value indicating whether the property is read-only.
IsRequiredGets a value indicating whether the property is required.
IsSpecialNameGets a value indicating whether the member is a special name.
IsStaticGets a value indicating whether the member is static.
IsUnsafeGets a value indicating whether this member is declared as unsafe.
OverloadsGets all the overloads of the member, excluding the member itself.
OverriddenPropertyGets the base property that this property overrides, if any.
ParametersGets all the parameters declared by the member.
SetMethodGets the set method of the property.
TypeGets 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.