PostSharp5.0//API Reference/Post­Sharp.​Patterns.​Diagnostics Namespace/Logger Class/Logger Methods/Logger.​Open­Activity Method/Logger.​Open­Activity(T1, T2, T3, T4, T5, T6, T7, T8, T9) Method (String, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Logger.OpenActivity<T1, T2, T3, T4, T5, T6, T7, T8, T9> Method (String, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Opens a custom activity with a description containing 9 parameters. The activity must be synchronous, i.e. must fully execute on the same thread and must not be interrupted by an await or yield return operator.

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 OpenActivity<T1, T2, T3, T4, T5, T6, T7, T8, T9>(
	string text,
	T1 arg1,
	T2 arg2,
	T3 arg3,
	T4 arg4,
	T5 arg5,
	T6 arg6,
	T7 arg7,
	T8 arg8,
	T9 arg9
)

Parameters

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.
arg5
Type: T5
Value of the 5-th parameter.
arg6
Type: T6
Value of the 6-th parameter.
arg7
Type: T7
Value of the 7-th parameter.
arg8
Type: T8
Value of the 8-th parameter.
arg9
Type: T9
Value of the 9-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.
T5
Type of the 5-th parameter.
T6
Type of the 6-th parameter.
T7
Type of the 7-th parameter.
T8
Type of the 8-th parameter.
T9
Type of the 9-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)].
See Also