ExtensionContainerInfo.GetExtensionMemberInfo Method

Namespace
Kampute.DocToolkit.Metadata.Reflection
Assembly
  • Kampute.DocToolkit.dll

Definition

Attempts to get extension member information for the specified method.
public MemberInfo GetExtensionMemberInfo(MethodInfo methodInfo)

Parameters

methodInfo MethodInfo
The reflection information of the method to examine.

Returns

MemberInfo
The extension member information if found; otherwise, null.

Exceptions

ArgumentNullException
Thrown if methodInfo is null.
ArgumentException
Thrown if methodInfo does not belong to the container type.

Remarks

This method returns the MemberInfo representing the extension member associated with the specified methodInfo.
  • If the method is an extension method, the returned MemberInfo will be a MethodInfo.
  • If the method is an extension property accessor, the returned MemberInfo will be a PropertyInfo.
  • If the method is neither or a classic extension method, the method returns null.