PostSharpAPI ReferencePost­Sharp.​ExtensibilityMessageMessage
Open sandboxFocus

Message Constructor

Message(MessageLocation, SeverityType, String, String, String, String, Exception)

Initializes a new Message and specifies all its properties.

Declaration
public Message(MessageLocation location, SeverityType severity, string messageId, string messageText, string helpLink, string source, Exception innerException)
Parameters
Type Name Description
MessageLocation location

Element of code (Assembly, System.Type, MethodInfo, ConstructorInfo, System.Reflection.PropertyInfo, EventInfo or ParameterInfo) to which the message applies. When called from PostSharp.Sdk, the parameter can also contain a MetadataDeclaration.

SeverityType severity

Message severity (fatal error, error, info, debug).

System.String messageId

Identifier of the message type.

System.String messageText

Fully formatted message text.

System.String helpLink

Link to the help file page associated to this message.

System.String source

Name of the component emitting the message.

Exception innerException

The Exception that caused this message, or null if this message was not caused by an exception.

Message(SeverityType, String, String, String, String, String, Int32, Int32, Exception)

Initializes a new Message and specifies all its properties.

Declaration
public Message(SeverityType severity, string messageId, string messageText, string helpLink, string source, string locationFile, int locationLine, int locationColumn, Exception innerException)
Parameters
Type Name Description
SeverityType severity

Message severity (fatal error, error, info, debug).

System.String messageId

Identifier of the message type.

System.String messageText

Fully formatted message text.

System.String helpLink

Link to the help file page associated to this message.

System.String source

Name of the component emitting the message.

System.String locationFile

File that caused the error, or null if the file is unknown or does not apply.

Int32 locationLine

Position (line) in the file that caused the error, or NotAvailable if the line is unknown or does not apply.

Int32 locationColumn

Position (column) in the file that caused the error, or NotAvailable if the line is unknown or does not apply.

Exception innerException

The Exception that caused this message, or null if this message was not caused by an exception.

Message(SeverityType, String, String, String, String, String, Int32, Int32, Int32, Int32, Exception)

Initializes a new Message and specifies all its properties.

Declaration
public Message(SeverityType severity, string messageId, string messageText, string helpLink, string source, string locationFile, int locationStartLine, int locationStartColumn, int locationEndLine, int locationEndColumn, Exception innerException)
Parameters
Type Name Description
SeverityType severity

Message severity (fatal error, error, info, debug).

System.String messageId

Identifier of the message type.

System.String messageText

Fully formatted message text.

System.String helpLink

Link to the help file page associated to this message.

System.String source

Name of the component emitting the message.

System.String locationFile

File that caused the error, or null if the file is unknown or does not apply.

Int32 locationStartLine

Start position (line) in the file that caused the error, or NotAvailable if the line is unknown or does not apply.

Int32 locationStartColumn

Start position (column) in the file that caused the error, or NotAvailable if the line is unknown or does not apply.

Int32 locationEndLine

End position (line) in the file that caused the error, or NotAvailable if the line is unknown or does not apply.

Int32 locationEndColumn

End position (column) in the file that caused the error, or NotAvailable if the line is unknown or does not apply.

Exception innerException

The Exception that caused this message, or null if this message was not caused by an exception.