PostSharp6.0/API Reference/Post­Sharp.​Patterns.​Diagnostics.​Contexts Namespace/Suspendable­Logging­Context Class/Suspendable­Logging­Context Methods/Suspendable­Logging­Context.​Suspend Method

SuspendableLoggingContext.Suspend Method

Suspends the current context. Typically called when starting to wait for a wait dependency (the operand of the await operator in case of async methods), or after the MoveNext() method (in case of iterators).

Namespace:  PostSharp.Patterns.Diagnostics.Contexts
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.0.35.0 (6.0.35.0)
Syntax
C#
public virtual void Suspend()
Remarks

In case of iterators, the Suspend() method is only invoked when MoveNext() returns true. Otherwise, the Dispose(Boolean) method is invoked.

See Also