PostSharp6.6//API Reference/Post­Sharp.​Patterns.​Diagnostics Namespace/Logger Class/Logger Methods/Logger.​Open­Activity Method/Logger.​Open­Activity(T1, T2) Method (String, T1, T2)

Logger.OpenActivity<T1, T2> Method (String, T1, T2)

Opens a custom activity with a description containing 2 parameters.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.6.14.0 (6.6.14.0)
Syntax
C#
public LogActivity OpenActivity<T1, T2>(
	string formattingString,
	T1 arg1,
	T2 arg2
)

Parameters

formattingString
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.

Type Parameters

T1
Type of the first parameter.
T2
Type of the second 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