Open sandboxFocus

Class SyncMethodLoggingContext

A LoggingContext that represents a synchronous method (not an async method, not an iterator).

Namespace: PostSharp.Patterns.Diagnostics.Contexts
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public class SyncMethodLoggingContext : SyncLoggingContext, ILoggingContext, IDisposable
Remarks

A custom backend that needs to store more data in this context can derive a class from it and override CreateSyncMethodContext(ThreadLoggingContext) to return an instance of the derived class. Instances are pooled per thread and reused for later method executions.

Constructors

Name Description
SyncMethodLoggingContext(ThreadLoggingContext)

Initializes a new instance of the SyncMethodLoggingContext class.

Methods

Name Description
Open(ref LogMemberInfo)

Opens the current context for a given member.

ReturnToPool()

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

See Also