Open sandboxFocus

Method Write

Write(Message)

Writes a message by providing a Message object.

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

A Message.

Write(MessageLocation, SeverityType, string, string)

Writes a message.

Declaration
public static void Write(MessageLocation messageLocation, SeverityType severity, string errorCode, string message)
Parameters
Type Name Description
MessageLocation messageLocation

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

Severity.

string errorCode

Error code.

string message

Error message.

Write(MessageLocation, SeverityType, string, string, params object[])

Writes a message.

Declaration
public static void Write(MessageLocation messageLocation, SeverityType severity, string errorCode, string format, params object[] arguments)
Parameters
Type Name Description
MessageLocation messageLocation

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

Severity.

string errorCode

Error code.

string format

Error message formatting string.

object[] arguments

Formatting string arguments.

Write(MemberInfo, SeverityType, string, string, params object[])

Writes a message.

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

Element of code to which the message applies.

SeverityType severity

Severity.

string errorCode

Error code.

string format

Error message formatting string.

object[] arguments

Formatting string arguments.

Write(Type, SeverityType, string, string, params object[])

Writes a message.

Declaration
public static void Write(Type type, SeverityType severity, string errorCode, string format, params object[] arguments)
Parameters
Type Name Description
Type type

Element of code to which the message applies.

SeverityType severity

Severity.

string errorCode

Error code.

string format

Error message formatting string.

object[] arguments

Formatting string arguments.

Write(ParameterInfo, SeverityType, string, string, params object[])

Writes a message.

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

Element of code to which the message applies.

SeverityType severity

Severity.

string errorCode

Error code.

string format

Error message formatting string.

object[] arguments

Formatting string arguments.

Write(Assembly, SeverityType, string, string, params object[])

Writes a message.

Declaration
public static void Write(Assembly codeElement, SeverityType severity, string errorCode, string format, params object[] arguments)
Parameters
Type Name Description
Assembly codeElement

Element of code to which the message applies.

SeverityType severity

Severity.

string errorCode

Error code.

string format

Error message formatting string.

object[] arguments

Formatting string arguments.

Write(LocationInfo, SeverityType, string, string, params object[])

Writes a message.

Declaration
public static void Write(LocationInfo codeElement, SeverityType severity, string errorCode, string format, params object[] arguments)
Parameters
Type Name Description
LocationInfo codeElement

Element of code to which the message applies.

SeverityType severity

Severity.

string errorCode

Error code.

string format

Error message formatting string.

object[] arguments

Formatting string arguments.