PostSharp6.4/API Reference/Post­Sharp.​Extensibility Namespace/Message­Location Class

MessageLocation Class

Represents the location of a message, which means, for the end-user, a line in a file of source code. From the aspect developer, the location can be known as an object representing an element of code (for instance a Type or MethodInfo). Such implicit locations are resolved by PostSharp to a file and line number.
Inheritance Hierarchy
System.Object
  PostSharp.Extensibility.MessageLocation

Namespace:  PostSharp.Extensibility
Assembly:  PostSharp (in PostSharp.dll) Version: 6.4.3.0 (6.4.3.0)
Syntax
C#
[SerializableAttribute]
public class MessageLocation

The MessageLocation type exposes the following members.

Properties
  NameDescription
Public propertyCodeElement
Element of code (reflection object or Declaration) from which the location must be resolved.
Public propertyEndColumn
Gets the ending column in the file that caused the message.
Public propertyEndLine
Gets the ending line in the file that caused the message.
Public propertyFile
Gets the name of the file that caused the message.
Public propertyStartColumn
Gets the starting column in the file that caused the message.
Public propertyStartLine
Gets the starting line in the file that caused the message.
Methods
  NameDescription
Public methodStatic memberExplicit(String)
Builds a MessageLocation explicitly by specifying a filename, when the
Public methodStatic memberExplicit(String, Int32, Int32)
Builds a MessageLocation explicitly by specifying a filename, line, and column.
Public methodStatic memberExplicit(String, Int32, Int32, Int32, Int32)
Builds a MessageLocation explicitly by specifying a filename, line, and column.
Public methodStatic memberOf(Object)
Builds a MessageLocation from an object representing an element of code (Type, MethodInfo, ConstructorInfo, FieldInfo, IExpression, Assembly, ParameterInfo, EventInfo, PropertyInfo or, if you are using PostSharp SDK, any Declaration).
Public methodStatic memberOf(Assembly)
Builds a MessageLocation from an Assembly.
Public methodStatic memberOf(MemberInfo)
Builds a MessageLocation from a MemberInfo (Type, MethodInfo, ConstructorInfo, FieldInfo, PropertyInfo, EventInfo).
Public methodStatic memberOf(ParameterInfo)
Builds a MessageLocation from a ParameterInfo.
Public methodStatic memberOf(IExpression)
Builds a MessageLocation from an IExpression.
Public methodStatic memberOf(LocationInfo)
Builds a MessageLocation from a LocationInfo.
Public methodStatic memberOf(SymbolSequencePoint)
Builds a MessageLocation from a SymbolSequencePoint.
Fields
  NameDescription
Public fieldStatic memberUnknown
Represents an unknown or indeterminate location of the error message.
See Also