MemberAdapterRepository.GetMethodMetadata Method
- Namespace
- Kampute.DocToolkit.Metadata.Adapters
- Assembly
- Kampute.DocToolkit.dll
Definition
Gets the method metadata for the specified method within the assembly.
public virtual IMethodBase GetMethodMetadata(MethodInfo methodInfo, bool asDeclared = false)Parameters
methodInfoMethodInfo- The reflection method to get metadata for.
asDeclaredbool optional- Indicates whether to retrieve extension methods in their declared form rather than their usage form.
Returns
- IMethodBase
- A metadata representation of the specified method.
Exceptions
- ArgumentNullException
- Thrown when
methodInfoisnull. - ArgumentException
- Thrown when
methodInfodoes not belong to the assembly.

asDeclaredisfalse(the default), extension methods are detected and resolved to reflect their usage form rather than their declared form. Otherwise, the metadata is retrieved as declared, without extension method detection and resolution.Based on the nature of the provided
methodInfo, the returned metadata may represent different method types: