PostSharp / / API Reference / Post­Sharp.​Patterns.​Diagnostics / Logging­Backend / Get­Async­Context­Of­Task
Open sandbox

Method GetAsyncContextOfTask

GetAsyncContextOfTask(Task)

Gets the AsyncMethodLoggingContext associated with a Task.

Declaration
public AsyncMethodLoggingContext GetAsyncContextOfTask(Task task)
Parameters
Type Name Description
Task task

A Task (typically representing an async method).

Returns
Type Description
AsyncMethodLoggingContext

The AsyncMethodLoggingContext associated with task, or null if no AsyncMethodLoggingContext is associated with task.