Open sandboxFocus

Class SyncCustomActivityLoggingContext

A LoggingContext that represents a synchronous custom activity, opened by the OpenActivity(string) method.

Inheritance
SyncCustomActivityLoggingContext
Namespace: PostSharp.Patterns.Diagnostics.Contexts
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public class SyncCustomActivityLoggingContext : SyncLoggingContext, ICustomActivityLoggingContext, ILoggingContext, IDisposable

Constructors

Name Description
SyncCustomActivityLoggingContext(ThreadLoggingContext)

Initializes a new SyncCustomActivityLoggingContext.

Properties

Name Description
CustomActivityKind

Gets the kind of LogActivity represented by the current context.

DefinedTransaction

Gets the LoggingTransaction defined by the current context.

IsHidden

Determines whether the current LoggingContext is hidden. Hidden contexts may define properties but should not be rendered.

StartTimestamp

Gets the timestamp (given by CurrentTimestamp) of the moment when the activity started.

SyntheticParentId

When this property returns a non-null value, the SyntheticId property shall use the value of the SyntheticParentId property as the parent identifier, instead of recursively building the synthetic identifier based on ParentContext. You can set this property when you open a custom activity by configuring the OpenActivityOptions object.

SyntheticRootId

When this property returns a non-null value, the SyntheticId property shall return the same value as the SyntheticRootId property, instead of starting with the id of the parent context. You can set this property when you open a custom activity by configuring the OpenActivityOptions object.

Methods

Name Description
Dispose(bool)

Disposes the current object.

GetExecutionContextData(LoggingExecutionContextData, bool)

Returns a new layer for the async stack that has this LoggingContext as the associated activity and current as the PostSharp.Patterns.Diagnostics.Contexts.LoggingExecutionContextData.Parent, if a new layer is required.

Open(LoggingTypeSource, in OpenActivityOptions)

Opens the current context.

ReturnToPool()

Returns the current instance to the pool to which it belongs. This method is invoked by the Dispose(bool) method.

SetWaitDependency(object)

Sets the wait dependency for the current context, i.e. sets a representation of what the current context is waiting for. This operation is available only in custom contexts.