Class AsyncOneTimeRunner
This class is used to ensure running of a code block only once. It can be instantiated as a static object to ensure that the code block runs only once in the application lifetime.
Inheritance
System.Object
AsyncOneTimeRunner
Namespace: Volo.Abp.Threading
Assembly: Volo.Abp.Core.dll
Syntax
public class AsyncOneTimeRunner : object
Methods
RunAsync(Func<Task>)
Declaration
public Task RunAsync(Func<Task> action)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<Task> | action |
Returns
| Type | Description |
|---|---|
| Task |