PostSharp 6.9 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics Namespace / ILog­Activity Interface / ILog­Activity Methods / ILog­Activity.​Set­Outcome(TMessage) Method

ILogActivity.SetOutcome<TMessage> Method

Closes the activity and sets its outcome.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.9.11.0 (6.9.11.0)
Syntax
C#
void SetOutcome<TMessage>(
	LogLevel level,
	 in TMessage message,
	Exception exception = null,
	 in CloseActivityOptions options = null
)
where TMessage : IMessage

Parameters

level
Type: PostSharp.Patterns.Diagnostics.LogLevel
Level of the outcome message.
message
Type: TMessageInAttribute
The description of the activity outcome, typically created using the SemanticMessageBuilder or FormattedMessageBuilder class.
exception (Optional)
Type: System.Exception
An optional Exception.
options (Optional)
Type: PostSharp.Patterns.Diagnostics.CloseActivityOptionsInAttribute
Options.

Type Parameters

TMessage
Type of the message parameter.
See Also