ExtensionReflectionRepository.GetNormalizedMethodInfo Method

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

Definition

Retrieves the normalized reflection information for the specified method as an extension method or property accessor.
public MethodInfo GetNormalizedMethodInfo(MethodInfo methodInfo)

Parameters

methodInfo MethodInfo
The reflection information of the method to normalize.

Returns

MethodInfo
The normalized extension method if the method is an extension method or property accessor; otherwise, the original method.

Exceptions

ArgumentNullException
Thrown if methodInfo is null.
ArgumentException
Thrown if methodInfo does not belong to the same assembly as the repository.

Remarks

This method returns the normalized reflection information for the specified methodInfo if the method is an extension method or an extension property accessor. If it is not, the original methodInfo is returned.

The normalized method of an extension method is a logical view of the method as it would appear when invoked on the extended type, rather than as a static method on the container type that has the extended type as its first parameter.