PostSharp 6.7 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics Namespace / Log­Activity Class / Log­Activity Methods / Log­Activity.​Set­Failure Method / Log­Activity.​Set­Failure(T1, T2) Method (String, T1, T2)

LogActivity.SetFailure<T1, T2> Method (String, T1, T2)

Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String) with failure and specifies a failure message with 2 parameters.

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

Parameters

formattingString
Type: System.String
The failure message with parameters, for instance Written {Count} lines.
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.
See Also