Executor.InitializeAsync(IWorkflowContext, 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.
Perform any asynchronous initialization required by the executor. This method is called once per executor instance,
protected internal virtual System.Threading.Tasks.ValueTask InitializeAsync(Microsoft.Agents.AI.Workflows.IWorkflowContext context, System.Threading.CancellationToken cancellationToken = default);
abstract member InitializeAsync : Microsoft.Agents.AI.Workflows.IWorkflowContext * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
override this.InitializeAsync : Microsoft.Agents.AI.Workflows.IWorkflowContext * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Protected Friend Overridable Function InitializeAsync (context As IWorkflowContext, Optional cancellationToken As CancellationToken = Nothing) As ValueTask
Parameters
- context
- IWorkflowContext
The workflow context in which the executor executes.
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.
Returns
A ValueTask representing the asynchronous operation.