PostSharp6.3/API Reference/Post­Sharp.​Patterns.​Diagnostics Namespace/Logging­Backend Class/Logging­Backend Methods/Logging­Backend.​Get­Async­Context­Of­Task Method

LoggingBackend.GetAsyncContextOfTask Method

Gets the AsyncMethodLoggingContext associated with a Task.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.3.11.0 (6.3.11.0)
Syntax
C#
public AsyncMethodLoggingContext GetAsyncContextOfTask(
	Task task
)

Parameters

task
Type: System.Threading.Tasks.Task
A Task (typically representing an async method).

Return Value

Type: AsyncMethodLoggingContext
The AsyncMethodLoggingContext associated with task, or null if no AsyncMethodLoggingContext is associated with task.
See Also