PostSharp 6.5 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Custom Namespace / Log­Level­Source Class / Log­Level­Source Methods / Log­Level­Source.​Log­Activity­Async Method / Log­Level­Source.​Log­Activity­Async(TDescription) Method (TDescription, Func(Task), Open­Activity­Options)

LogLevelSource.LogActivityAsync<TDescription> Method (TDescription, Func<Task>, OpenActivityOptions)

Executes an asynchronous void delegate and logs its execution.

Namespace:  PostSharp.Patterns.Diagnostics.Custom
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.5.19.0 (6.5.19.0)
Syntax
C#
public Task LogActivityAsync<TDescription>(
	 in TDescription description,
	Func<Task> action,
	 in OpenActivityOptions options = null
)
where TDescription : IMessage

Parameters

description
Type: TDescription
The activity description, typically created using the SemanticMessageBuilder or FormattedMessageBuilder class.
action
Type: System.Func<Task>
The action be be executed.
options (Optional)
Type: PostSharp.Patterns.Diagnostics.OpenActivityOptions
Options.

Type Parameters

TDescription
The type of the description message.

Return Value

Type: Task
The Task.
See Also