Logger.OpenActivity<T1, T2> Method (LogActivityOptions, String, T1, T2) |
Opens a custom activity with 2 parameters.
Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.5.21.0 (6.5.21.0)
C#
public LogActivity OpenActivity<T1, T2>( LogActivityOptions options, string formattingString, T1 arg1, T2 arg2 )
Parameters
- options
- Type: PostSharp.Patterns.Diagnostics.LogActivityOptions
Options. - formattingString
- Type: System.String
The formatting string of the activity description, 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: LogActivityA Logger representing the new activity.
The activity must be closed using SetSuccess(String), SetFailure(String) or SetException(Exception).