Compartilhar via


RandomSelector.SelectAsync(ActionContext, CancellationToken) Método

Definição

Seleciona a melhor regra a ser executada.

public override System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.Bot.Builder.Dialogs.Adaptive.Conditions.OnCondition>> SelectAsync (Microsoft.Bot.Builder.Dialogs.Adaptive.ActionContext context, System.Threading.CancellationToken cancellationToken = default);
override this.SelectAsync : Microsoft.Bot.Builder.Dialogs.Adaptive.ActionContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.Bot.Builder.Dialogs.Adaptive.Conditions.OnCondition>>
Public Overrides Function SelectAsync (context As ActionContext, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyList(Of OnCondition))

Parâmetros

context
ActionContext

O DialogContext para a virada atual da conversa.

cancellationToken
CancellationToken

CancellationToken da tarefa.

Retornos

Melhor regra na lista original para executar ou -1 se nenhuma.

Aplica-se a