PostSharpAPI ReferencePost­Sharp.​Patterns.​DiagnosticsLogging­BackendGet­Async­Context­Of­Task
Open sandboxFocus

LoggingBackend.GetAsyncContextOfTask Method

GetAsyncContextOfTask(Task)

Gets the AsyncMethodLoggingContext associated with a System.Threading.Tasks.Task.

Declaration
public AsyncMethodLoggingContext GetAsyncContextOfTask(Task task)
Parameters
Type Name Description
System.Threading.Tasks.Task task

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

Returns
Type Description
AsyncMethodLoggingContext

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