Język

TaskDefinition<TInput,TOutput>.RunAsync Method

Definition

Starts the task and awaits it to completion, returning the typed result.

public virtual System.Threading.Tasks.Task<TOutput> RunAsync(TInput input, Azure.AI.AgentServer.Core.Tasks.RunOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RunAsync : 'Input * Azure.AI.AgentServer.Core.Tasks.RunOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Output>
override this.RunAsync : 'Input * Azure.AI.AgentServer.Core.Tasks.RunOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Output>
Public Overridable Function RunAsync (input As TInput, Optional options As RunOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TOutput)

Parameters

input
TInput

The typed input.

options
RunOptions

Optional per-invocation options.

cancellationToken
CancellationToken

A cancellation token.

Returns

Task<TOutput>

The typed result.

Applies to