Jaa


DateTimePrompt.OnRecognizeAsync Method

Definition

Attempts to recognize the user's input as a date-time value.

protected override System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.PromptRecognizerResult<System.Collections.Generic.IList<Microsoft.Bot.Builder.Dialogs.DateTimeResolution>>> OnRecognizeAsync (Microsoft.Bot.Builder.ITurnContext turnContext, System.Collections.Generic.IDictionary<string,object> state, Microsoft.Bot.Builder.Dialogs.PromptOptions options, System.Threading.CancellationToken cancellationToken = default);
override this.OnRecognizeAsync : Microsoft.Bot.Builder.ITurnContext * System.Collections.Generic.IDictionary<string, obj> * Microsoft.Bot.Builder.Dialogs.PromptOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.PromptRecognizerResult<System.Collections.Generic.IList<Microsoft.Bot.Builder.Dialogs.DateTimeResolution>>>
Protected Overrides Function OnRecognizeAsync (turnContext As ITurnContext, state As IDictionary(Of String, Object), options As PromptOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of PromptRecognizerResult(Of IList(Of DateTimeResolution)))

Parameters

turnContext
ITurnContext

Context for the current turn of conversation with the user.

state
IDictionary<String,Object>

Contains state for the current instance of the prompt on the dialog stack.

options
PromptOptions

A prompt options object constructed from the options initially provided in the call to PromptAsync(String, PromptOptions, CancellationToken).

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

A Task representing the asynchronous operation.

Remarks

If the task is successful, the result describes the result of the recognition attempt.

Applies to