Language

IResilientTaskHandler<TInput,TOutput>.RunAsync Method

Definition

Executes one attempt using the current task context.

public System.Threading.Tasks.Task<TOutput> RunAsync(Azure.AI.AgentServer.Core.Tasks.TaskContext<TInput> context, System.Threading.CancellationToken cancellationToken = default);
abstract member RunAsync : Azure.AI.AgentServer.Core.Tasks.TaskContext<'Input> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Output>
Public Function RunAsync (context As TaskContext(Of TInput), Optional cancellationToken As CancellationToken = Nothing) As Task(Of TOutput)

Parameters

context
TaskContext<TInput>

The context for the current task turn.

cancellationToken
CancellationToken

The cooperative cancellation token for this attempt.

Returns

Task<TOutput>

The typed task result.

Applies to