MethodAdapter Class
- Namespace
- Kampute.DocToolkit.Metadata.Adapters
- Assembly
- Kampute.DocToolkit.dll
Definition
An adapter that wraps a MethodInfo and provides metadata access.
public class MethodAdapter : VirtualTypeMemberAdapter<MethodInfo>, IMethod- Inheritance
- Implements
Remarks
This class serves as a bridge between the reflection-based MethodInfo and the metadata representation defined by the IMethod interface. It provides access to method-level information regardless of whether the assembly containing the method'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
| MethodAdapter(IType, MethodInfo) | Initializes a new instance of the MethodAdapter class. |
Properties
| ImplementedMethod | Gets the interface method that this method implements, if any. |
| IsAsync | Gets a value indicating whether the method is asynchronous. |
| IsExtension | Gets a value indicating whether the method is an extension method. |
| IsGenericMethod | Gets a value indicating whether the method is generic. |
| IsReadOnly | Gets a value indicating whether the method 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. |
| Overloads | Gets all the overloads of the member, excluding the member itself. |
| OverriddenMethod | Gets the base method that this method overrides, if any. |
| Parameters | Gets all the parameters declared by the member. |
| Return | Gets the return parameter of the member. |
| TypeParameters | Gets the type parameters declared by the method if it is generic. |
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. |
| GetCodeReferenceParts() | Retrieves the code reference parts for this member. |
| GetMemberVirtuality() | Retrieves the virtuality of the member. |
| GetMemberVisibility() | Retrieves the visibility of the member. |
| GetParameters() | Retrieves the parameters of the method. |
| GetReturnParameter() | Retrieves the return parameter of the method. |
| GetTypeParameters() | Retrieves the type parameters defined by the method. |
| HasMatchingSignature(IMethod) | Determines whether the given method can be considered a base declaration of this method. |
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. |
