PostSharp6.1/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: 6.1.23.0 (6.1.23.0)
Syntax
C#
public AsyncMethodLoggingContext OpenAsyncContext(
	AsyncCallId asyncCallId,
	ref LogMemberInfo logMemberInfo
)

Parameters

asyncCallId
Type: PostSharp.Aspects.AsyncCallId
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