Share via


DialogContext.PromptAsync(String, PromptOptions, CancellationToken) Methode

Definition

Hilfsfunktion zur Vereinfachung der Formatierung der Optionen zum Aufrufen eines Eingabeaufforderungsdialogfelds. Dieses Hilfsprogramm verwendet ein options Argument und ruft dann auf BeginDialogAsync(String, Object, CancellationToken).

public System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogTurnResult> PromptAsync (string dialogId, Microsoft.Bot.Builder.Dialogs.PromptOptions options, System.Threading.CancellationToken cancellationToken = default);
member this.PromptAsync : string * Microsoft.Bot.Builder.Dialogs.PromptOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogTurnResult>
Public Function PromptAsync (dialogId As String, options As PromptOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DialogTurnResult)

Parameter

dialogId
String

ID des Eingabeaufforderungsdialogfelds zum Starten.

options
PromptOptions

Informationen, die an das gestartete Eingabeaufforderungsdialogfeld übergeben werden sollen.

cancellationToken
CancellationToken

Ein Abbruchtoken, das von anderen Objekten oder Threads verwendet werden kann, um Nachricht vom Abbruch zu empfangen.

Gibt zurück

Eine Aufgabe, die die auszuführende Arbeit in der Warteschlange darstellt.

Hinweise

Wenn die Aufgabe erfolgreich ist, gibt das Ergebnis an, ob der Dialog nach der Verarbeitung durch den Dialog noch aktiv ist.

Gilt für:

Weitere Informationen