PostSharp 5.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Extensibility Namespace / IMessage­Location­Resolver Interface / IMessage­Location­Resolver Methods / IMessage­Location­Resolver.​Get­Message­Location Method

IMessageLocationResolver.GetMessageLocation Method

Gets the file and line where a declaration is declared.

Namespace:  PostSharp.Extensibility
Assembly:  PostSharp (in PostSharp.dll) Version: 5.0.55.0 (5.0.55.0)
Syntax
C#
MessageLocation GetMessageLocation(
	Object codeElement
)

Parameters

codeElement
Type: System.Object
A MemberInfo, Type, ParameterInfo or LocationInfo.

Return Value

Type: MessageLocation
A MessageLocation describing where codeElement is declared, or Unknown if the location cannot be determined.
See Also