A LoggingContext that represents a method or activity that can be suspended and resume (possibly on a different thread), such as an async method or an iterator.
Inheritance
Namespace: PostSharp.Patterns.Diagnostics.Contexts
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public abstract class SuspendableLoggingContext : LoggingContext, ILoggingContext, IDisposable
Properties
Name | Description |
---|---|
IsSuspended | Determines whether the current context is currently suspended (between a Suspend() and a Resume()). |
ThreadContext | Gets the ThreadLoggingContext for the thread in which the current LoggingContext is currently executed. |
Methods
Name | Description |
---|---|
Dispose(bool) | Disposes the current object. |
Resume() | Resumes the current context. Typically called when the state machine resumes execution, when the wait dependency is satisfied (in case of async methods) or when the MoveNext() method is called (in case of iterators). |
ResumeConditional() | Resume the current context, but only if it is currently suspended. |
Suspend() | Suspends the current context. Typically called when starting to wait for a wait dependency (the operand of the |
ToString(StringBuilder) | Formats a description of the current LoggingContext into a given StringBuilder. |