PostSharp5.0//API Reference/Post­Sharp.​Patterns.​Diagnostics Namespace/Logging­Backend Class/Logging­Backend Methods/Logging­Backend.​Open­Async­Context Method

LoggingBackend.OpenAsyncContext Method

Gets an AsyncMethodLoggingContext for a given async method.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 5.0.55.0 (5.0.55.0)
Syntax
C#
public AsyncMethodLoggingContext OpenAsyncContext(
	Task task,
	ref LogMemberInfo logMemberInfo
)

Parameters

task
Type: System.Threading.Tasks.Task
The Task associated to the async method being logged, or null if the Task cannot be determined.
logMemberInfo
Type: PostSharp.Patterns.Diagnostics.Contexts.LogMemberInfo
A reference to a LogMemberInfo describing the method being logged.

Return Value

Type: AsyncMethodLoggingContext
An AsyncMethodLoggingContext for logMemberInfo.
See Also