AsyncLazyInitializer.InitializeAsync(CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Executes the action given in the constructor if it has not yet been executed, or waits for it to complete if in progress from a prior call.
public System.Threading.Tasks.Task InitializeAsync (System.Threading.CancellationToken cancellationToken = default);
member this.InitializeAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function InitializeAsync (Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- cancellationToken
- CancellationToken
Returns
A task that tracks completion of the action.
Exceptions
Any exception thrown by the action is rethrown here.