PostSharp5.0//API Reference/Post­Sharp.​Patterns.​Diagnostics Namespace/Logger Class/Logger Methods/Logger.​Open­Async­Activity Method/Logger.​Open­Async­Activity Method (String)

Logger.OpenAsyncActivity Method (String)

Opens an asynchronous custom activity with an optional description, but without parameters.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 5.0.55.0 (5.0.55.0)
Syntax
C#
public LogActivity OpenAsyncActivity(
	string text
)

Parameters

text
Type: System.String
A description of the activity, or null to use the caller method name as the activity description.

Return Value

Type: LogActivity
A Logger representing the new activity.
Remarks

The activity must be closed using [!:SetSuccess(string)], [!:SetFailure(String)] or [!:SetException(Exception)].

You must manually call [!:Suspend], [!:Resume] and/or [!:Await(Task)] around await operators.

See Also