PostSharp 6.8 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Custom Namespace / Log­Level­Source Class / Log­Level­Source Methods / Log­Level­Source.​Open­Activity(T) Method

LogLevelSource.OpenActivity<T> Method

Opens an activity.

Namespace:  PostSharp.Patterns.Diagnostics.Custom
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.8.6.0 (6.8.6.0)
Syntax
C#
public LogActivity<T> OpenActivity<T>(
	 in T description,
	 in OpenActivityOptions options = null
)
where T : IMessage

Parameters

description
Type: T
The activity description, typically created using the SemanticMessageBuilder or FormattedMessageBuilder class.
options (Optional)
Type: PostSharp.Patterns.Diagnostics.OpenActivityOptions
Options.

Type Parameters

T

Return Value

Type: LogActivity<T>
A Logger representing the new activity.
Remarks
The activity must be closed using SetSuccess(String), SetFailure(String) or SetException(Exception).
See Also