PostSharpAPI ReferencePost­Sharp.​ExtensibilityMessage­SourceWrite
Open sandboxFocus

MessageSource.Write Method

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

Emits a Message and specifies an inner 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).

System.String messageId

Identifier of the message type.

Exception innerException

The 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).

System.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
System.Reflection.MemberInfo codeElement

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

SeverityType severity

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

System.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).

System.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
Assembly codeElement

Source code artifact that caused the message.

SeverityType severity

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

System.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)