Open sandboxFocus

Constructor WriteMessageOptions

WriteMessageOptions(object)

Initializes a new instance of the WriteMessageOptions struct and optionally specifies the properties from a CLR object.

Declaration
public WriteMessageOptions(object data = null)
Parameters
Type Name Description
object data

Optional. Specifies the properties of the WriteMessageOptions. It is typically an instance of a well-known or anonymous CLR type. The resulting LogEventData has the default LogEventMetadata. This means that all CLR properties are exposed as logging properties, unless they are annotated with LoggingPropertyOptionsAttribute.

WriteMessageOptions(in LogEventData)

Initializes a new instance of the WriteMessageOptions struct and optionally specifies the properties from a LogEventData.

Declaration
public WriteMessageOptions(in LogEventData data)
Parameters
Type Name Description
LogEventData data

Optional. Specifies the properties of the WriteMessageOptions. See LogEventData.