PostSharp 5.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics Namespace / Logger Class / Logger Methods / Logger.​Open­Async­Activity Method / Logger.​Open­Async­Activity(T1, T2, T3, T4) Method (Log­Activity­Options, String, T1, T2, T3, T4)

Logger.OpenAsyncActivity<T1, T2, T3, T4> Method (LogActivityOptions, String, T1, T2, T3, T4)

Opens an asynchronous custom activity with a description containing 4 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<T1, T2, T3, T4>(
	LogActivityOptions options,
	string text,
	T1 arg1,
	T2 arg2,
	T3 arg3,
	T4 arg4
)

Parameters

options
Type: PostSharp.Patterns.Diagnostics.LogActivityOptions
text
Type: System.String
The description of the activity, including parameters (e.g. Writing {LineCount} line(s) in file {Path}).
arg1
Type: T1
Value of the first parameter.
arg2
Type: T2
Value of the second parameter.
arg3
Type: T3
Value of the third parameter.
arg4
Type: T4
Value of the 4-th parameter.

Type Parameters

T1
Type of the first parameter.
T2
Type of the second parameter.
T3
Type of the third parameter.
T4
Type of the 4-th parameter.

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