Open sandboxFocus

Struct OpenActivityOptions

Represents the argument of the OpenActivity<T>(in T, in OpenActivityOptions) method.

Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Common.dll
Syntax
public struct OpenActivityOptions
Remarks

To open a transaction that the logging policies of the configuration file can match, create the options with the Transaction kind and a LogEventData whose LogEventMetadata exposes the expression model of the transaction, then call ApplyTransactionRequirements(ref OpenActivityOptions) before opening the activity. To bypass the policies, set the TransactionRequirement property directly.

Constructors

Name Description
OpenActivityOptions(in LogEventData, LogActivityKind)

Initializes a new instance of the OpenActivityOptions struct and specifies properties using a LogEventData.

OpenActivityOptions(object, LogActivityKind)

Initializes a new instance of the OpenActivityOptions struct and specifies properties using an arbitrary object (possibly of an anonymous class).

Properties

Name Description
Data

Gets or sets the properties of the OpenActivityOptions. They are typically specified as an instance of a well-known or anonymous CLR type.

IncomingRequestOptions

Gets or sets the logging options set by the remote caller of the request represented by the current OpenActivityOptions.

IsSyntheticRootId

Gets or sets a value indicating whether the resulting activity is assigned a global id, irrespective of the id generation strategy. When this property is true, the resulting SyntheticId is rooted by the current activity. When this property is false, the SyntheticId may start with the id of the parent context.

Kind

Gets or sets the kind of LogActivity.

Properties

Gets or sets the activity properties.

SyntheticParentId

Gets or sets the parent identifier of the synthetic identifier. When this property is set to a non-null value, the SyntheticId property shall use this property as the parent identifier, instead of recursively building the synthetic identifier based on the parent context.

SyntheticRootId

Gets or sets the root identifier of the synthetic identifier. When this property is set to a non-null value, the SyntheticId property shall return the value of this property, instead of starting with the id of the parent context.

TransactionRequirement

Gets or sets the TransactionRequirement for the current activity. These requirements can be set by the caller of OpenActivity<T>(in T, in OpenActivityOptions) or by ApplyTransactionRequirements(ref OpenActivityOptions).

See Also