-
-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Description
In addition to ExecuteSection
methods of ILogManager
new async method versions are added:
Task ExecuteSectionAsync(LogSection section, Func<Task> function);
Task<TResult> ExecuteSectionAsync<TResult>(LogSection section, Func<Task<TResult>> function);
Usage
await AtataContext.Current.Log.ExecuteSectionAsync(
new LogSection("Do some async work without result"),
async () =>
{
//...
});
var result = await AtataContext.Current.Log.ExecuteSectionAsync(
new LogSection("Do some async work with result"),
async () =>
{
return await SomeActionAsync();
});