PostSharpAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​ContextsILogging­Context
Open sandboxFocus

ILoggingContext Interface

Defines the minimal semantics of a logging context required by the Logger class.

Namespace: PostSharp.Patterns.Diagnostics.Contexts
Assembly: PostSharp.Patterns.Common.dll
Syntax
[InternalImplement(AttributeId = 627500528741416984L)]
[HasConstraint]
public interface ILoggingContext

Properties

Name Description
IsAsync

Determines whether the context represents an async method or a custom activity in an async method.

IsDisposed

Determines whether the context is currently disposed (contexts can be recycled, therefore the disposed state is not the final state).

RecycleId

Gets an integer that is incremented every time the current instance is being recycled.

SyntheticId

Gets a cross-process globally unique identifier for the current context.

Methods

Name Description
ForEachProperty(LoggingPropertyVisitor<Object>, Boolean)

Invokes a delegate for each property defined in the current logging context and optionally in its ancestor contexts.

ForEachProperty<T>(LoggingPropertyVisitor<T>, ref T, Boolean)

Invokes a delegate for each property defined in the current logging context and optionally in its ancestor contexts, and specifies passes a state object to the delegate.