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: 2023.0.3.0 (2023.0.3.0)
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: TaskThe Task.