PostSharp 6.9 / / 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 Method (String, Object[])

LogActivity.SetFailure Method (String, Object[])

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

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.9.1.0 (6.9.1.0)
Syntax
C#
public void SetFailure(
	string text,
	params Object[] args
)

Parameters

text
Type: System.String
The failure message with parameters, for instance Invalid file at line {Line}.
args
Type: System.Object[]
An array of parameters.
See Also