OpenActivityOptions(object, LogActivityKind)
Initializes a new instance of the OpenActivityOptions struct and specifies properties using an arbitrary object (possibly of an anonymous class).
Declaration
public OpenActivityOptions(object data = null, LogActivityKind kind = LogActivityKind.Default)Parameters
| Type | Name | Description |
|---|---|---|
| object | data | Optional. Specifies the properties of the OpenActivityOptions. 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. |
| LogActivityKind | kind | Optional. The kind of activity. |
OpenActivityOptions(in LogEventData, LogActivityKind)
Initializes a new instance of the OpenActivityOptions struct and specifies properties using a LogEventData.
Declaration
public OpenActivityOptions(in LogEventData data, LogActivityKind kind = LogActivityKind.Default)Parameters
| Type | Name | Description |
|---|---|---|
| LogEventData | data | Optional. Specifies the properties of the WriteMessageOptions. See LogEventData. |
| LogActivityKind | kind | Optional. The kind of activity. |