ActivityPrompt Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines the core behavior of a prompt dialog that waits for an activity to be received.
public class ActivityPrompt : Microsoft.Bot.Builder.Dialogs.Dialog
type ActivityPrompt = class
inherit Dialog
Public Class ActivityPrompt
Inherits Dialog
- Inheritance
Remarks
This prompt requires a validator be passed in and is useful when waiting for non-message activities like an event to be received.The validator can ignore received activities until the expected activity type is received.
Constructors
ActivityPrompt(String, PromptValidator<Activity>) |
Initializes a new instance of the ActivityPrompt class. Called from constructors in derived classes to initialize the ActivityPrompt class. |
Properties
Id |
Gets or sets id for the dialog. (Inherited from Dialog) |
Source |
Gets the information of the cref="SourceRange"/>. (Inherited from Dialog) |
TelemetryClient |
Gets or sets the IBotTelemetryClient to use for logging. (Inherited from Dialog) |
Methods
BeginDialogAsync(DialogContext, Object, CancellationToken) |
Called when a prompt dialog is pushed onto the dialog stack and is being activated. |
ContinueDialogAsync(DialogContext, CancellationToken) |
Called when a prompt dialog is the active dialog and the user replied with a new activity. |
EndDialogAsync(ITurnContext, DialogInstance, DialogReason, CancellationToken) |
Called when the dialog is ending. (Inherited from Dialog) |
GetVersion() |
Gets a unique string which represents the version of this dialog. If the version changes between turns the dialog system will emit a DialogChanged event. (Inherited from Dialog) |
OnComputeId() |
Builds the compute Id for the dialog. (Inherited from Dialog) |
OnDialogEventAsync(DialogContext, DialogEvent, CancellationToken) |
Called when an event has been raised, using |
OnPostBubbleEventAsync(DialogContext, DialogEvent, CancellationToken) |
Called after an event was bubbled to all parents and wasn't handled. (Inherited from Dialog) |
OnPreBubbleEventAsync(DialogContext, DialogEvent, CancellationToken) |
Called before an event is bubbled to its parent. (Inherited from Dialog) |
OnPromptAsync(ITurnContext, IDictionary<String,Object>, PromptOptions, Boolean, CancellationToken) |
When overridden in a derived class, prompts the user for input. |
OnPromptAsync(ITurnContext, IDictionary<String,Object>, PromptOptions, CancellationToken) |
When overridden in a derived class, prompts the user for input. |
OnRecognizeAsync(ITurnContext, IDictionary<String,Object>, PromptOptions, CancellationToken) |
When overridden in a derived class, attempts to recognize the incoming activity. |
RegisterSourceLocation(String, Int32) |
Registers a cref="SourceRange"/> in the provided location. (Inherited from Dialog) |
RepromptDialogAsync(ITurnContext, DialogInstance, CancellationToken) |
Called when a prompt dialog has been requested to re-prompt the user for input. |
ResumeDialogAsync(DialogContext, DialogReason, Object, CancellationToken) |
Called when a prompt dialog resumes being the active dialog on the dialog stack, such as when the previous active dialog on the stack completes. |
Extension Methods
RunAsync(Dialog, ITurnContext, IStatePropertyAccessor<DialogState>, CancellationToken) |
Creates a dialog stack and starts a dialog, pushing it onto the stack. |