A degenerate kind of LoggingContext that is used to emit standalone records.
Namespace: PostSharp.Patterns.Diagnostics.Contexts
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public class EphemeralLoggingContext : LoggingContext, ILoggingContext, IDisposableRemarks
A custom backend that needs to store more data in this context can derive a class from it and override CreateEphemeralContext(ThreadLoggingContext) to return an instance of the derived class.
Constructors
| Name | Description |
|---|---|
| EphemeralLoggingContext(LoggingBackend, ThreadLoggingContext) | Initializes a new instance of the EphemeralLoggingContext class. |
Properties
| Name | Description |
|---|---|
| IsAsync | Gets a value indicating whether the current LoggingContext represents an async method or an asynchronous custom activity. |
| ThreadContext | Gets the ThreadLoggingContext for the thread in which the current LoggingContext is currently executed. |
Methods
| Name | Description |
|---|---|
| Dispose(bool) | Disposes the current object. |
| Open(LoggingContext, LoggingTypeSource) | Opens the context. |