PostSharp.ILAPI ReferencePost­Sharp.​ExtensibilityMessage­SourceWrite
Open sandboxFocus

MessageSource.Write Method

Write(MessageLocation, SeverityType, String, Exception, Object[])

Emits a Message and specifies an inner System.Exception.

Declaration
public void Write(MessageLocation location, SeverityType severity, string messageId, Exception innerException, params object[] arguments)
Parameters
Type Name Description
MessageLocation location

Location of the source code artifact that caused the message.

SeverityType severity

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

String messageId

Identifier of the message type.

System.Exception innerException

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

Object[] arguments

Array of arguments used to format the message text, or null if this message has no argument.

Write(MessageLocation, SeverityType, String, Object[])

Emits a Message.

Declaration
public void Write(MessageLocation location, SeverityType severity, string messageId, params object[] arguments)
Parameters
Type Name Description
MessageLocation location

Location of the source code artifact that caused the message.

SeverityType severity

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

String messageId

Identifier of the message type.

Object[] arguments

Array of arguments used to format the message text, or null if this message has no argument.

Write(MemberInfo, SeverityType, String, Object[])

Emits a Message.

Declaration
public void Write(MemberInfo codeElement, SeverityType severity, string messageId, params object[] arguments)
Parameters
Type Name Description
MemberInfo codeElement

Source code artifact (Type, System.Reflection.MethodInfo, System.Reflection.ConstructorInfo, System.Reflection.FieldInfo, System.Reflection.EventInfo, PropertyInfo) that caused the message.

SeverityType severity

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

String messageId

Identifier of the message type.

Object[] arguments

Array of arguments used to format the message text, or null if this message has no argument.

Write(ParameterInfo, SeverityType, String, Object[])

Emits a Message.

Declaration
public void Write(ParameterInfo codeElement, SeverityType severity, string messageId, params object[] arguments)
Parameters
Type Name Description
ParameterInfo codeElement

Source code artifact that caused the message.

SeverityType severity

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

String messageId

Identifier of the message type.

Object[] arguments

Array of arguments used to format the message text, or null if this message has no argument.

Write(Assembly, SeverityType, String, Object[])

Emits a Message.

Declaration
public void Write(Assembly codeElement, SeverityType severity, string messageId, params object[] arguments)
Parameters
Type Name Description
System.Reflection.Assembly codeElement

Source code artifact that caused the message.

SeverityType severity

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

String messageId

Identifier of the message type.

Object[] arguments

Array of arguments used to format the message text, or null if this message has no argument.

Write(Message)

Writes a message to the sink.

Declaration
public void Write(Message message)
Parameters
Type Name Description
Message message

A message.

Implements
IMessageSink.Write(Message)