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 : MethodBaseAdapter, 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
| ExtensionBlock | Gets the extension block where the member is defined if the member is a block extension member. |
| ExtensionReceiver | Gets the receiver parameter of the extension member if it is an extension member. |
| ImplementedMethod | Gets the interface method that this method implements, if any. |
| IsClassicExtensionMethod | Gets a value indicating whether the method is a classic extension method. |
| IsExtension | Gets a value indicating whether the member is an extension member. |
| IsGenericMethod | Gets a value indicating whether the method is generic. |
| Overloads | Gets all the overloads of the member, excluding the member itself. |
| OverriddenMethod | Gets the base method that this method overrides, if any. |
| TypeParameters | Gets the type parameters declared by the method if it is generic. |
Methods
| ConstructCodeReference() | Constructs the code reference string for this member. |
| 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. |
| GetCodeReferenceParts() | Retrieves the code reference parts for this member. |
| GetExtensionBlock() | Retrieves the extension block associated with the method, if it is an extension method. |
| GetMethodsWithSameName(IType, bool) | Retrieves methods from the specified type that have the same name as this method. |
| GetTypeParameters() | Retrieves the type parameters defined by the method. |
| HasMatchingSignature(IMethodBase) | 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. |
