Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Code / Declaration­Extensions / Get­Closest­Named­Type

Method GetClosestNamedType

GetClosestNamedType(IDeclaration)

Gets the declaring INamedType of a given declaration if the declaration if not an INamedType, or the INamedType itself if the given declaration is itself an INamedType.

Declaration
public static INamedType GetClosestNamedType(this IDeclaration declaration)
Parameters
Type Name Description
IDeclaration declaration
Returns
Type Description
INamedType