Open sandboxFocus

Constructor Message

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, Type, MethodInfo, ConstructorInfo, 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).

string messageId

Identifier of the message type.

string messageText

Fully formatted message text.

string helpLink

Link to the help file page associated to this message.

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, int, int, 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).

string messageId

Identifier of the message type.

string messageText

Fully formatted message text.

string helpLink

Link to the help file page associated to this message.

string source

Name of the component emitting the message.

string locationFile

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

int locationLine

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

int 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, int, int, int, int, 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).

string messageId

Identifier of the message type.

string messageText

Fully formatted message text.

string helpLink

Link to the help file page associated to this message.

string source

Name of the component emitting the message.

string locationFile

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

int locationStartLine

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

int locationStartColumn

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

int locationEndLine

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

int 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.